Announcement Announcement Module
Collapse
No announcement yet.
Deleting an orpahn in E.M Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deleting an orpahn in E.M

    hi ,
    how can i delete an orpahn of a onetomanty assoication in jpa ?
    e.g :

    A a = em.find(A.class,1)
    Collection<B> bs = a.getbs();
    bs.remove(bs.iterator.next())
    bs.add(new B()) ;
    em.merge(a) ;

    the above adds a new instance and doesn't delete the removed b

    ?
Working...
X