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: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: fitas amine
Votes: 0
Watchers: 0

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

JDOQL of "interfaceField == implValue" causes exception

Created: 17/Feb/11 12:45 PM   Updated: 07/Mar/11 05:37 PM   Resolved: 18/Feb/11 06:48 PM
Component/s: Queries
Affects Version/s: 2.2.0.m1, 2.2.1, 3.0.0.m1
Fix Version/s: 3.0.0.m2

File Attachments: 1. Zip Archive (6 kB)

Environment: all versions of DN

Severity: Production

 Description  « Hide
imagine Class A and B, Class A implements and Interface let s call it C.

class B is a Child of A.

now class D has a persistant member which is of the interface type C.

now logically if I want to query class D I can use both types class A and B

but when I uses class B the below exception happens

I have attached a special test case which demonestrate this problem.

java.lang.ClassCastException: cannot be cast to
at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileRelationalExpression(
at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileOrAndExpression(
at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.evaluate(
at org.datanucleus.query.expression.Expression.evaluate(
at org.datanucleus.query.expression.DyadicExpression.evaluate(

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 17/Feb/11 01:32 PM
Nothing to do with JDO Typesafe queries, so no idea why it was raised there. Moved to RDBMS

Andy Jefferson added a comment - 18/Feb/11 06:48 PM
SVN trunk works for me.

Not backporting on 2.2 branch without commercial input