Looks like you are on the right track with the persist-flush-refresh sequence. 
Yep, I think em.persist() would be more suitable.  

If User is the owner I doubt you want CascadeType.ALL on the Group's Set (which 
you have as Set which I suspect is a typo?).  Perhaps a subset of ALL?

Regarding updates, you can just update an entity, and, assuming cascade is on, 
it will be merged to the database at the next flush (explicit or implicit at 
transaction boundary).

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

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

Reply via email to