[jboss-user] [JBoss Seam] - Re: Remove from list using EntityHome
lightbulb432
do-not-reply at jboss.com
Fri Feb 16 11:17:53 EST 2007
"petemuir" wrote : 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).
Where should I set the breakpoint in my debugger to do an entityManager.contains() check?
Or if it's better to output a FacesMessage with this value, where should I put that debugging line?
anonymous wrote : And beware of the fact that a remove won't remove the entity from memory - it just detaches it from the persistence context.
So the refreshed page after the delete would still show the removed entity in the list right? But if I look in my DB, am I correct to say I should no longer see it there (if things work correctly) even though it's still in memory?
Next question is why does this happen - isn't entity-query EVENT-scoped, which means that on the next refresh it doesn't exist and has to hit the DB again?
Thanks a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017709#4017709
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017709
More information about the jboss-user
mailing list