• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Repitative records.

 
ambar patil
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic