openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SreeAsh <srinivasulu.krist...@fs.mphasis.com>
Subject How to access the TWO different OBJECTS to one entity......
Date Fri, 11 Jun 2010 04:43:49 GMT

Hi All,


    I am retriving two different table date and returing one object like
below.

 query = "SELECT d1, d2.Description FROM dummy1 d1, Dummy2 d2 WHERE d1.id =
d2.id"

I am taking Result in ObjectArray like below..
Object[] objAray = null;
Dummy dum = null;
List<Dummy> dumList = new ArrayList<Dummy>();
List l =  emQuery.getResultSet();
for(int i=0;i<list.size();i++){
     objAray  = (Object[])list.get(i);
dum  = new Dummy();
dum.setId((Integet)objArr[0]);
     so.......
dumList .addd(dum);
  
}

can suggest me other than this method......
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/How-to-access-the-TWO-different-OBJECTS-to-one-entity-tp5166491p5166491.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message