Issue Details (XML | Word | Printable)

Key: NUCRDBMS-366
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

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

JDOQL2 : when we create an SQLExpression for a function call, the SQLStatement isn't passed in so can get it wrong

Created: 16/Apr/10 10:18 AM   Updated: 26/Apr/10 03:39 PM   Resolved: 16/Apr/10 11:08 AM
Component/s: Queries
Affects Version/s: 2.0.0.release, 2.0.1, 2.0.2, 2.0.3, 2.1.0.m1
Fix Version/s: 2.1.0.m2


 Description  « Hide
If we have an expression like

dataField0.text.toLowerCase().indexOf(searchText0.toLowerCase()) >= 0

and the dataField0 is part of a subquery, so hence is toLowerCase() of that, when we generate the expression for indexOf, it creates a new NumericExpression for the call, but doesn't pass in the SQLStatement (because it can't currently), and so sets it from the statement of the argument (which is the main statement).

The statement of the indexOf should be the same as what it is invoked on, not the same as the argument passed in to it.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 16/Apr/10 11:08 AM
SVN trunk now passes in the SQLStatement to use.