• 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: 662
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!