This one time, at band camp, Jon Burford said:
JB>I have looked through the archives and have not found any mention of
JB>this. I have used even the latest code, but with no success.
JB>Basically, I have a query that contains parentheses like so:
JB>
JB>OQLQuery oql = db.getOQLQuery("CALL SQL select * from a where a.b
JB>> (select MAX(x) from y) AS classA");
JB>
JB>What I have noticed is that when I have SQL with parens in it,
JB>everything within the parens is removed. If I try this:
JB>
JB>OQLQueryImpl oqli = (OQLQueryImpl)oql;
JB>System.out.println("query=<"+oqli.getSQL()+">");
JB>
JB>I see that the SQL which is created looks like this:
JB>
JB>SQL select * from a where a.b > ()
JB>
JB>Why is this? How can I use nested queries and/or SQL with ANY parens in
JB>them and pass this to getOQLQuery and exceute them? Any help is
JB>MUCH appreciated. Also, I am not on the mailing list, so please reply
JB>directly.
Jon,
Castor does not support sub-selects. Please see the FAQ under the
question 'Does Castor OQL support sub queries?' here:
http://castor.exolab.org/jdo-faq.html#OQL
Maybe what you are looking for is a method of passing raw SQL to
Castor. There is a feature in Castor to do this. Please see the
question 'Can I write a pass-thru OQL?'
http://castor.exolab.org/jdo-faq.html#OQL
I hope this helps.
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