Hmm... maybe you should addnotate the collection with Cascade.REMOVE ?

For example:


  | public class Container {
  | private List<Item> items;
  | 
  | @OneToMany(cascade=CascadeType.REMOVE)
  | public List<Item> getItems();
  | }
  | 

When you remove an item from the list, you removed the entity from the 
datastore too. 

  | getItems().remove(0);
  | em.merge(container);
  | 
I think it should work, but not sure for 100%. 


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912275


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to