The moose likes Object Relational Mapping and the fly likes Repitative records. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Repitative records." Watch "Repitative records." New topic
Author

Repitative records.

ambar patil
Ranch Hand

Joined: Nov 29, 2005
Posts: 226
I have one object which has oneToMany relationship with 3 others child object.when I call get child object it gives repitative records? any solution ?
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 504

Getting three objects is possible if there are three entries in your database. If you have a flag like active flag to filter the child entries, use it while fetching or in your xml.
Lest, use a set, which prevents duplicates.


If you are not laughing at yourself, then you just didn't get the joke.
 
 
subject: Repitative records.
 
Threads others viewed
Dont know how to map if there is no primary key???
Hibernate:Eager fetching
How does Hibernate get child objects
iBatis resultMap groupBy Question
retaining records after a submit in struts 2
developer file tools