This content has been marked as final.
Show 2 replies
-
1. Re: can FetchType.EAGER be used when loading an entity?
petergoldstein Mar 15, 2006 4:36 PM (in response to liudan2005)Assuming you've got an entity bean type User with a properties association and an id field on it, I believe you should be able to create the appropriate query as follows:
em.createQuery("select u from User as u left join fetch u.properties where id = :id")
For more info see section 7.3 of the Hibernate EntityManager guide -
2. Re: can FetchType.EAGER be used when loading an entity?
liudan2005 Mar 15, 2006 6:03 PM (in response to liudan2005)Thanks a lot Peter. It solved my problem.