Hi,
I use castor 0.9.3 and I have a strange problem when executing a SELECT
order.
My object model is :
MessageDO (master object) has, among many attributes, a collection (the
attribute is called orderIds) of OrderIdDO objects. The OrderIdDO class
is just an id attribute and a link to a message.
I need a finder that returns the MessageDO object according to the
received OrderIdDO id so I wrote this for the request :
SELECT m FROM prefix.MessageDO m WHERE exists o in m.orderIds:o.id=$1
When I try to execute this order, I get the following error :
org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token type
was found near o (2, need 0
at org.exolab.castor.jdo.oql.Parser.match(Parser.java:144)
at
org.exolab.castor.jdo.oql.Parser.getParseTree(Parser.java:106)
at
org.exolab.castor.jdo.engine.OQLQueryImpl.create(OQLQueryImpl.java:267)
at
org.exolab.castor.jdo.engine.DatabaseImpl.getOQLQuery(DatabaseImpl.java:438)
at prefix.FindMessage.findMessage(FindMessage.java:120)
at prefix.FindMessage.main(FindMessage.java:87)
Exception in thread "main" org.exolab.castor.jdo.PersistenceException:
jdo.dbClosedTxRolledback
at
org.exolab.castor.jdo.engine.DatabaseImpl.close(DatabaseImpl.java:247)
at prefix.FindMessage.main(FindMessage.java:97)
Having a quick look at the class TokenTypes, it seems that the query
parsing is not successful
(found IDENTIFIER, needs END_OF_QUERY)
I tried lots of combinations, but in my opinion the previous order seems
to be correct according to the OQL syntax on the castor site.
What is wrong in this query ?
Thx,
Dus
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev