Hello Oleg,

Can you turn the Castor log on and send the full SQL query that is generated?

Oleg

On Wednesday 08 August 2001 12:05, Oleg V Alexeev wrote:
> Hello Low,
>
> Wednesday, August 08, 2001, 12:40:28 PM, you wrote:
>
> LHS> Have u try this
>
> LHS> select c from com.id.dm.dbeans.CategoryLang c where is_undefined(
> LHS> c.boss.parent )
>
> Yes, of course. Castor parse it and pass to the DB2. And DB2 raise
> error -
>
> COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/2] SQL0104N  An
> unexpected token "." was found following "m.cat_lang,dm.cat dm".
> Expected tokens may include:  ",".  SQLSTATE=42601
>
> LHS> -----Original Message-----
> LHS> From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
> LHS> Sent: Wednesday, August 08, 2001 4:27
> LHS> To: [EMAIL PROTECTED]
> LHS> Subject: [castor-dev] Complex query
>
>
> LHS> Hello castor-dev,
>
> LHS>   How can I write a query with complex predicate in WHERE section of
> LHS>   OQL? For example - I try to query database with such OQL as -
>
> LHS>   select c from com.id.dm.dbeans.CategoryLang l where is_defined(
> LHS>   c.boss.parent )
>
> LHS>   com.id.dm.dbeans.CategoryLang class has getBoss() method and section
> LHS>   in mapping.xml -
>
> LHS>   <field name="boss" type="com.id.dm.dbeans.Category" require="true">
> LHS>     <sql name="cont_id"/>
> LHS>   </field>
>
> LHS>   com.id.dm.dbeans.Category has getParent() method.
>
> LHS>   How can I query such com.id.dm.dbeans.CategoryLang objects as for
> LHS>   that objects getBoss().getParent() returns null?

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

Reply via email to