Issue Details (XML | Word | Printable)

Key: NUCCORE-1062
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

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

Simplify process of defining static methods for JDOQL; currently resolves the class name to a ClassLiteral during compilation, incorrectly

Created: 30/Jul/13 06:07 PM   Updated: 31/Jul/13 04:53 PM   Resolved: 30/Jul/13 06:26 PM
Component/s: Queries
Affects Version/s: 2.2.4, 3.0.11, 3.1.5, 3.2.5
Fix Version/s: 3.2.6

 Description  « Hide
Where we define a static method for JDOQL like

this is being compiled as
InvokeExpression{[Literal{class java.lang.String}].valueOf(PrimaryExpression{myField})}

but should be compiled as

The workaround is to define a query "prefix" as

<extension point="org.datanucleus.query_method_prefix">
    <query-method-prefix prefix="String" alias="String"/>

but that is a bit hacky IMHO.

Andy Jefferson added a comment - 30/Jul/13 06:26 PM
SVN trunk now detects an invoke on a class literal and converts the compilation into a static invoke

Andy Jefferson made changes - 30/Jul/13 06:26 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.2.6 [ 11993 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 31/Jul/13 04:53 PM
Status Resolved [ 5 ] Closed [ 6 ]