Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate and composite-element. how to remove?!  RSS feed

 
Olexiy Prokhorenko
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there!

I was using this http://www.hibernate.org/118.html#A11 suggestion to build my mapping.

my looks the following way:



everything works perfectly well while fetching already existed information in database.

so, for each com.op.objects.Candidate object we have Set of com.op.objects.CandidateSkill objects, for each of them we can call .getSkill() and get com.op.objects.Skill object. everything is perfect from this side.

but how can we remove any com.op.objects.CandidateSkill from Set?
I thought that "all-delete-orphan" at least somehow will help me, but when I am doing (i.e. for candidate with id = 10):



I am getting an exception No persister for: com.op.objects.CandidateSkill...

is there any way out?

thank you in advance!
 
Olexiy Prokhorenko
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
solved. thanks.
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you mind posting a brief description of the solution in case someone else has the same problem?

Thanks, and good job!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!