Hello,
    I am Ramu. I am having a problem with deleting objects from join table 
(many-to-many) relationship.my code is as follows

 Vendor child = this.manager.getReference(Vendor.class, vendorid );
              
                 Collection listParents = child.getBuyers();
                 Iterator iteratorParents = listParents.iterator();
                 while (iteratorParents.hasNext() == true) 
                 {
                         Buyer parentForChild = iteratorParents.next();
                   parentForChild.getVendors().remove(child);
                 }
                   
                 this.manager.remove(child);    

  but it is deleting the child object  from parent table also. i want to delete 
only from join table not from original table . any help appreciated.

Thank u
Ramu

 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190326#4190326

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190326
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to