Chris Cooper [
https://community.jboss.org/people/ccooperfos] created the discussion
"Hibernate sessions in JBoss AS7 using JPA"
To view the discussion, visit:
https://community.jboss.org/message/830944#830944
--------------------------------------------------------------
Apologies if this isn't the right forum, if it's not please direct me to a more
appropriate location!
After following the reverse engineering tutorial (
http://docs.jboss.org/tools/movies/#hibreveng
http://docs.jboss.org/tools/movies/#hibreveng) I've successfully generated a set of
entities from database tables. However when trying to duplicate the example REST services
from the sample application for another entity (in this case, Film from the sakila
database) I run into a problem - the entity isn't able to lazily load the collections
that are part of it.
I've done some Hibernate work before but not using JPA or EJB annotations and am now
stuck as to how I should be handling requests like this. I've found some stuff about
writing an interceptor to manually create Sessions but was wondering if there was a clear
set of instructions as to how this is best achieved (preferably I'd like some
instruction on a continuation of the example application used in the video linked to
above!)
Thanks to anyone who can provide assistance!
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/830944#830944]
Start a new discussion in Beginner's Corner at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]