[jboss-user] [JBoss Seam] - Re: Remove from list using EntityHome
do-not-reply at jboss.com
Fri Feb 16 11:04:43 EST 2007
This is an equally valid way of doing it (and neat as well - avoids exposing your id's to the world) but I guess it's tricky to get working.
My best guess as to why it fails from what you've said is that by passing the instance through the datamodel like that it has become unmanaged so cannot be removed - you can check this by calling entityManager.contains(). Setting by Id rather than instance might just work (use it with my.getId rather than rowIndex).
And beware of the fact that a remove won't remove the entity from memory - it just detaches it from the persistence context.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017698#4017698
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017698
More information about the jboss-user