db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jefferson chaves gomes" <jeffer...@amhpdf.com.br>
Subject Fw: OJB queries.....
Date Wed, 20 Apr 2005 18:55:18 GMT

----- 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
-- 
Jefferson Chaves 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message