This one time, at band camp, Robert Kent said:
RK>I (mostly) answered my own question. Now there's a followup.
RK>
RK>Firstly, I figured out the setClassLoader issues; I was creating the objects
RK>in the wrong sequence, and the class loader wasn't set yet.
RK>
RK>But one of my queries also gave me problems. The query:
RK>
RK> db.getOQLQuery("SELECT s FROM Shop s WHERE id=$1")
RK>
RK>doesn't work at all. Even though the class Shop is used elsewhere in the
RK>program, and a call to "jdo.create(new Shop())" works okay, the query above
RK>still throws a QueryException: "cannot find class Shop."
RK>
RK>So, I modified it:
RK>
RK> db.getOQLQuery("SELECT s FROM com.rjkcomm.Shop s WHERE id=$1")
RK>
RK>which works fine. However, this is going to get onerous if I define my
RK>classes as part of a package and have to specify them in full every time.
RK>Is there a way to get around this in the OQL?
Please post the relevant portion of source code and mapping
descriptor. Above you state that you call jdo.create() which is
incorrect. All CRUD is performed via the Database object using create(),
update() (only used wit transactions) and delete(). So I'm wondering is
there are some other descrepancies in your use of the API.
RK>Also, and perhaps as a more general answer to this, is there a definitive
RK>reference to OQL as used in Castor?
Unfortunately, at this time, the only thing available is the EBNF here:
http://www.castor.org/oql.html
However, please stay tuned. This will change soon ;-).
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev