"petemuir" wrote : Yes, use a SMPC, not an extended PC.  You don't want the 
@Transactional on those methods (it's an entity bean), and you probably want to 
let hibernate take care up updating the relationship for you - call 
entityManager.refresh(foo) to get hibernate to do this.

I now tried to do the refreshing but had no luck. I stumpled acrross several 
Forum posts taht cite the following from the EJB 3.0 specs:
anonymous wrote : 
  | Note that it is the application that bears responsibility for maintaining 
the consistency of runtime
  | relationships?for example, for insuring that the ?one? and the ?many? sides 
of a bidirectional
  | relationship are consistent with one another when the application updates 
the
  | relationship at runtime.
  | 

Doesnt that mean i should do those gruppe.add/remove calls in 
Benutzer.setGruppe() ???

Greetings,
Tobias


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

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

Reply via email to