-->
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: Unwanted Duplicate records returned - please help
PostPosted: Fri Sep 19, 2008 5:56 pm 
Beginner
Beginner

Joined: Mon Jul 09, 2007 2:21 pm
Posts: 24
Table A:

ID
NAME
ACTIVE

TABLE B:
ID
A_ID (Foreign key referencing table A)



Table A
1 name1 T
2 name2 T
3 name3 T


Table B
100 1
101 1
102 2
103 3

HQL:

"from TableA a left join fetch a.TableB where a.active='T'"

This returns a list which has name1 repeated twice...

i want list of tableA objects and i should be able to navigate to each Table A' object's set to fetch Table B's objects

How do i modify the query to achieve that?

Right now, it returns 4 items in the list with item1 and item2 name being the same


Thank you


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.