JBoss Community

Re: EntityManager.remove() throws java.lang.IllegalArgumentException: Removing a detached instance ?

created by Ibrahim Abu Ghosh in EJB3 Development - View the full discussion

thats right, or you can find the entity by primary key then remove it like this :

YourEntity e = em.find(YourEntity.class, entityId);//e is the managed entity

em.remove(e);

Reply to this message by going to Community

Start a new discussion in EJB3 Development at Community