[jboss-user] [EJB 3.0] - Re: Update for entities with oneToMany relatinship not worki

2007-08-27 Thread mohali
I am not using merge as I am doing a find on the user first and then setting the new set of permissions on the user. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4078376#4078376 Reply to the post :

[jboss-user] [EJB 3.0] - Re: Update for entities with oneToMany relatinship not worki

2007-08-27 Thread CarstenRudat
Hi mohali, I'm not quite sure, but I think you have to set a relationship on both ends: | for(PermissionEntityEJB permissionEntity : permissionsList) { | permissionEntity.setUser(usrEntity); | } | Am I wrong? View the original post :

[jboss-user] [EJB 3.0] - Re: Update for entities with oneToMany relatinship not worki

2007-08-27 Thread mohali
And I am setting the user for the new permissions and it does persist the new permissions. The only issue is with permissions that were in the old set but not there in the new set of permissions. Do I have delete those explicitly or the container can be smart enough to replace the old set of

[jboss-user] [EJB 3.0] - Re: Update for entities with oneToMany relatinship not worki

2007-08-25 Thread waynebaylor
are you saving using EntityManager.merge ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4078025#4078025 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4078025 ___ jboss-user