db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Youngho Cho" <youn...@nannet.co.kr>
Subject Re: Criteria.Criterion and Join
Date Fri, 30 Mar 2007 01:24:24 GMT
I overexpected the generated sql statement when criterion join add.
I added the necessary sql statement in other place.


Thanks anyway.

Youngho


----- Original Message ----- 
From: "Adam Allgaier" <allgaier2@yahoo.com>
To: "Apache Torque Users List" <torque-user@db.apache.org>
Sent: Friday, March 30, 2007 12:46 AM
Subject: Re: Criteria.Criterion and Join


> Did you try this (replacing the column names with the Torque column names):
> 
>         c1 = crit.getNewCriterion(moduleField, 
>                 (Object) moduleField 
>                 + "="+JettigerModule.MODULE_ID+" AND "+JettigerModule.PARENT_ID+"=" 
>                 + item.getParentId(), 
>                 Criteria.CUSTOM);    
> 
> Adam
> 
> 
> ----- Original Message ----
> From: Youngho Cho <youngho@nannet.co.kr>
> To: Apache Torque Users List <torque-user@db.apache.org>
> Sent: Wednesday, March 28, 2007 10:14:56 PM
> Subject: Criteria.Criterion and Join
> 
> Hello 
> 
> 
> 
> I would like to use join in the Criterion .
> 
> 
> 
> There is no join related method with Criterion 
> 
> I use CUSTOM like 
> 
> 
> 
> 
> 
>         c1 = crit.getNewCriterion(moduleField, 
> 
>                 (Object) moduleField 
> 
>                 + "=JETTIGER_MODULE.MODULE_ID AND JETTIGER_MODULE.PARENT_ID=" 
> 
>                 + item.getParentId(), 
> 
>                 Criteria.CUSTOM);    
> 
> 
> 
> 
> 
> But I got the following SQLException
> 
> java.sql.SQLException: Base table or view not found message from server: "Unknown table
'JETTIGER_MODULE' in where clause".
> 
> 
> 
> 
> 
> Is there any way using join within Criterion ??
> 
> 
> 
> 
> 
> Thanks.
> 
> 
> 
> Youngho
> 
> 
> 
> 
>  
> ____________________________________________________________________________________
> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
Mime
View raw message