I was responding to the parser error.

As far as I know you must fill an object not just get random fields.
Using custom SQL your query has to start with "CALL SQL" and end with
"AS <full class name here>"

The class needs to be in your mapping file ( I believe ) and the 
order of the fields needs to be the same as in your mapping file, 
with the exception that identity fields are at the very front even if 
they are not at the front of your mapping description.

so in your example below why not return a full object and just use 
the fields that you want?

Walt


> Kevin, Vaneet, others...,
> 
> How should I interpret this comment from
> http://castor.exolab.org/jdo-faq.html then (see below). Does it not say I
> can retrieve some single fields from my table? And isn't that also what
> Walter is doing (Subject: problem with CALL SQL)?
> 
> *
> 
> Can I write a pass-thru OQL?
> 
> Yes. Just put "CALL SQL" in front of your SQL statement.
> 
> For example,
> 
>     OQLQuery oql = castorDb.getOQLQuery(
>         "CALL SQL SELECT id, name, date "+
>         "FROM user WHERE upper(name) like $1");
> 
> Be remember that the order of the fields listed must match what is defined
> in the mapping file.
> 
> *
> 
> Edwin
> 
> --
> ****************************************************************************
> This message contains information that may be privileged or confidential and
> is the property of the Cap Gemini Ernst & Young Group. It is only intended
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorized to read, print, retain, copy disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all copies
> of this message.
> ****************************************************************************
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 


*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO.        email : [EMAIL PROTECTED]     
259 Front St.            Phone : (207) 442-7994 x 128
Bath, ME 04530           Fax   : (207) 443-6284
*****************************************************

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to