db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: Fw: OJB queries.....
Date Thu, 21 Apr 2005 17:02:10 GMT
hi jefferson,

ojb will automatically join the two tables if you define a relationship 
between them in repository.xml.

http://db.apache.org/ojb/docu/guides/query.html
http://db.apache.org/ojb/docu/guides/query.html#joins

jakob

jefferson chaves gomes schrieb:
> ----- Original Message ----- 
> From: jefferson chaves gomes 
> To: OJB Ajuda 
> Sent: Wednesday, April 20, 2005 3:48 PM
> Subject: OJB queries.....
> 
> 
>  Hi, I'm from Brazil, then it forgives my English, I want to use OJB and divulge it in
Brazil, but I have a problem ......
> 
>    How I can do a querie with more than one table.
>    For example(this example was removed of your site OK):
> 
> I know that this reply it is in the site: http://db.apache.org/ojb/docu/guides, but I
am not understanding.
> Please, you can say me as to make this example below since the beginning, or either,
> with the mapping of the archive repository_database.xml and  the necessary classes .java
for I make it  ?????
> 
> 
> SELECT DISTINCT A0.ID, A1.VALUEFROM CONTAINER A0 INNER JOIN ABSTRACT_ATTRIBUTE A1   
 ON A0.ID=A1.REF_ID     INNER JOIN ABSTRACT_ATTRIBUTE A2     ON A0.ID=A2.REF_ID     INNER
JOIN ABSTRACT_ATTRIBUTE A3     ON A0.ID=A3.REF_IDWHERE (( A0.NAME =  'companyName' ) AND 
(A0.VALUE =  'iBanx' )) AND      (( A1.NAME =  'contactPerson' ) AND  (A1.VALUE LIKE '%janssen%'
)) AND      (( A2.NAME =  'size' ) AND  (A2.VALUE =  '500' ))
>  My main doubt is: How to work with more than with one table ?
>  This because to use one table in the querie for me is not problem OK?
>  Please, help me to learn and to divulge this framework here in Brazil

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message