You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by SreeAsh <sr...@fs.mphasis.com> on 2010/06/11 06:43:49 UTC

How to access the TWO different OBJECTS to one entity......

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.