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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...