Can you provide the section of code that is setting the parameter and executing the query. Can you send a bit more of the stack trace?
--Gordon
-----Original Message-----
From: Christian Kerwer [mailto:Christian.Kerwer_at_t-online.de]
Sent: Monday, January 28, 2008 9:50 AM
To: persistence_at_glassfish.dev.java.net
Subject: Bug Comparing Enum with Bindingparameter
Hello,
I'm experiencing a problem with NamedQueries.
In den following example in a NamedQuery an enum-field is to be compared with an binding-parameter.
There's no reason why this is not allowed, since it is possible to bind enum parameter with ,query.setParameter()'.
Toplink quits this issue with the following reason:
invalid enum equal expression, cannot compare enum value of type [MyEnumType] with a non enum value of type [java.lang.Object]
Anyone an idea?