[jboss-user] [EJB 3.0] - regarding EJBQL and object equality
do-not-reply at jboss.com
Wed Apr 23 00:33:20 EDT 2008
I have a simple query in which I want to select records that meet equality condition with an Enum type.
select t from MyEntity t where t.statusType is not StatusType.NEW
StatusType is an enum contains NEW, SENT, ABANDONED
at first, it was an error, complained that unable to resolve the StatusType so I changed it to
t.statusType is not com.myejb.enums.StatusType.NEW
and it worked fine but now I need to add another condition:
t.statusType is not com.myejb.enums.StatusType.NEW and
| t.statusType is not com.myejb.enums.StatusType.SENT
but the TopLink complains that there is a syntax error near the [com] and she can't resolve this query.
how can I test the equality in such way?
thank you all
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146028#4146028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146028
More information about the jboss-user