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)

Key: NUCRDBMS-319
Type: Task Task
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 : ObjectLiteral == ObjectExpression with composite id doesn't generate correct clauses

Created: 02/Mar/10 09:21 PM   Updated: 17/Mar/10 08:52 PM   Resolved: 02/Mar/10 09:44 PM
Component/s: Queries
Affects Version/s: None
Fix Version/s: 2.0.2


 Description  « Hide
If we have something like

parameter.field == this

where they are both of the same (candidate) type, then an incorrect SQL is generated. See test.jdo.application "JDOQLContainerTest" e.g testQueryUsesContainsOnceOnOneUnboundVariableInverseUsingParameter (last query)


Cannot perform operation "==" on org.datanucleus.store.rdbms.sql.expression.StringLiteral@1664cde and A0.GLOBALNUM
org.datanucleus.store.rdbms.sql.expression.IllegalExpressionOperationException: Cannot perform operation "==" on org.datanucleus.store.rdbm
s.sql.expression.StringLiteral@1664cde and A0.GLOBALNUM
        at org.datanucleus.store.rdbms.sql.expression.SQLExpression.eq(SQLExpression.java:375)
        at org.datanucleus.store.rdbms.sql.expression.StringExpression.eq(StringExpression.java:145)
        at org.datanucleus.store.rdbms.sql.expression.StringLiteral.eq(StringLiteral.java:116)
        at org.datanucleus.store.rdbms.sql.expression.ExpressionUtils.getEqualityExpressionForObjectExpressions(ExpressionUtils.java:416)
        at org.datanucleus.store.rdbms.sql.expression.ObjectLiteral.eq(ObjectLiteral.java:142)
        at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processEqExpression(QueryToSQLMapper.java:1262)

Andy Jefferson made changes - 02/Mar/10 09:22 PM
Field Original Value New Value
Description If we have something like

parameter.field == this

where they are both of the same (candidate) type, then an incorrect SQL is generated. See test.jdo.application "JDOQLContainerTest" e.g testQueryUsesContainsOnceOnOneUnboundVariableInverseUsingParameter (last query)
If we have something like

parameter.field == this

where they are both of the same (candidate) type, then an incorrect SQL is generated. See test.jdo.application "JDOQLContainerTest" e.g testQueryUsesContainsOnceOnOneUnboundVariableInverseUsingParameter (last query)


Cannot perform operation "==" on org.datanucleus.store.rdbms.sql.expression.StringLiteral@1664cde and A0.GLOBALNUM
org.datanucleus.store.rdbms.sql.expression.IllegalExpressionOperationException: Cannot perform operation "==" on org.datanucleus.store.rdbm
s.sql.expression.StringLiteral@1664cde and A0.GLOBALNUM
        at org.datanucleus.store.rdbms.sql.expression.SQLExpression.eq(SQLExpression.java:375)
        at org.datanucleus.store.rdbms.sql.expression.StringExpression.eq(StringExpression.java:145)
        at org.datanucleus.store.rdbms.sql.expression.StringLiteral.eq(StringLiteral.java:116)
        at org.datanucleus.store.rdbms.sql.expression.ExpressionUtils.getEqualityExpressionForObjectExpressions(ExpressionUtils.java:416)
        at org.datanucleus.store.rdbms.sql.expression.ObjectLiteral.eq(ObjectLiteral.java:142)
        at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processEqExpression(QueryToSQLMapper.java:1262)
Andy Jefferson added a comment - 02/Mar/10 09:44 PM
SVN trunk now allows this ... XXXExpression eq/gt/ne/ge/lt/le needed to handle ColumnExpression comparison.

Andy Jefferson made changes - 02/Mar/10 09:44 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.0.2 [ 10870 ]
Fix Version/s 2.1.0.release [ 10832 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 17/Mar/10 08:52 PM
Status Resolved [ 5 ] Closed [ 6 ]