[jboss-user] [JBoss Seam] - Lazy loading exception with Seam EM
trouby
do-not-reply at jboss.com
Tue Jan 1 05:54:17 EST 2008
Hey,
I have a very simple authenticate component as in all seam examples such:
| @In
| EntityManager entityManager;
|
| @Out(required=false, scope = SESSION)
| User loggedUser;
|
|
| public boolean authenticate() {
| //load the user from db and set it into 'loggedUser' var
| }
|
| |
| |
| |
| |
| | Well it works fine, the loggedUser object is being outjected to the session, the problem is that when I touch the collections of the 'loggedUser' entity (that are fetched lazily) I get lazy collection exceptions,
| |
| |
| | shouldn't any entity loaded by Seam's EM has to being in managed state for the whole user session (as long as I'm always using Seam's EM of course) ?
| |
| |
| | Thanks,
| |
| | Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116230#4116230
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116230
More information about the jboss-user
mailing list