DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Daniel Dai
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Provide the ability to override a builtin method mapping

Created: 09/Dec/13 09:48 PM   Updated: 30/Apr/15 07:27 PM   Resolved: 29/Apr/15 09:56 AM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 4.1.0.m4

 Description  « Hide
Not sure if it qualifies a bug, but we've seen a behavior change after NUCRDBMS-606. Before that, we have a datanucleus plugin in a separate jar, which overrides one standard extension point:
<sql-method class="java.lang.String" method="substring" datastore="sqlserver" evaluator="org.apache.hadoop.hive.datanucleus.sqlserver.StringSubstringSQLServerMethod"/>

After NUCRDBMS-606, it takes the default version instead: (See store.rdbms/plugin.xml):
<sql-method class="java.lang.String" method="substring" datastore="sqlserver" evaluator=""/>

What is the sequence to load the configuration? Is it possible to override the standard extension point reliably?

Andy Jefferson added a comment - 10/Dec/13 06:12 AM
Anything has to be demonstratable, and that's where a testcase comes in

Andy Jefferson made changes - 10/Dec/13 06:12 AM
Field Original Value New Value
Priority Major [ 3 ] No Testcase [ 6 ]
Andy Jefferson added a comment - 10/Dec/13 06:25 AM
There has never been any ability to request the override of a provided method handler. Look at the schema/sql_method.exsd which has no "priority" attribute; would need one adding. Then would need the code in SQLExpressionFactory to use the priority value in deciding which method is being supported (the same thing is already done for some other extension points)

Andy Jefferson made changes - 10/Dec/13 06:25 AM
Summary Behavior change after NUCRDBMS-606 Provide the ability to override a builtin method mapping
Issue Type Bug [ 1 ] New Feature [ 2 ]
Priority No Testcase [ 6 ] Major [ 3 ]
Daniel Dai added a comment - 10/Dec/13 07:56 PM
Thanks Andy. With NUCRDBMS-717/NUCRDBMS-718, this is no longer a priority for us, but remain a good to have feature.

Do you have an expectation of the next datanucleus-rdbms release date?

Andy Jefferson added a comment - 10/Dec/13 07:58 PM
3.2.9 of datanucleus-rdbms was released earlier today actually (in Maven Central now); I was almost ready to release when you raised your issues but they were an easy addition.

Daniel Dai added a comment - 10/Dec/13 08:02 PM
Wow that's quick, thanks!

Andy Jefferson made changes - 11/Dec/13 12:10 PM
Priority Major [ 3 ] Minor [ 4 ]
Andy Jefferson added a comment - 29/Apr/15 09:56 AM
GitHub master adds priority attribute to plugin extension points for sql_method/sql_operation. Left as an exercise to the user to try it (no testcase provided)

Andy Jefferson made changes - 29/Apr/15 09:56 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 4.1.0.m4 [ 12354 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 30/Apr/15 07:27 PM
Status Resolved [ 5 ] Closed [ 6 ]