[jboss-user] [EJB 3.0 Users] - Re: EntityManager.refresh() works only on managed entities.

Wolfgang Knauf do-not-reply at jboss.com
Mon Nov 23 07:38:19 EST 2009


Hi,

you might better ask this in some EJB spec forum ;-).
The spec/JavaDoc at http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html#refresh%28java.lang.Object%29 explicitely states:
...
  | Throws:
  |     IllegalArgumentException - if not an entity or entity is not managed 
  |   ...
  | 

To refresh a detached entity, you have to use "find" or "getReference".

Best regards

Wolfgang


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

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



More information about the jboss-user mailing list