-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: createSQLQuery with 2 Entities and deep object structure
PostPosted: Sat Jul 07, 2007 5:32 am 
Newbie

Joined: Tue Nov 28, 2006 5:39 am
Posts: 3
Hibernate version: Hibernate 3.1.2

Hello Forum Users,

I have a simple query with 2 entities.

List result = session.createSQLQuery(
"from TableA a, TableB b where b.id=a.id")
.addEntity(TableA.class)
.addEntity(TableB.class)
.list();


I can access the result with:

Object[] arr =(Object[]) result.get(0);

But the objects have no reference to each other. How can I achieve, that the objects have a reference to each other?

Thx


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.