Hello, I am creating the own EntityManger for each query to execute? is it required to close the EntityManger after execution of the each Query, I have lazy loading(fetch type) on my data objects with some relationships(like OnetoMany, ManytoOne and ManytoMany), If I close the EntityManger after the Query execution, i couldn't get data thru relationships as it defined fetch type is "Lazy" and EntityManger is no more active.
is there any other soultion except changing the fetch type is from lazy to Eager.. or I should not close the EntityManger after query execution, If I won't close the EntityManager what are the Cons????? when EntityManager instance will be garabage collect???? Any idea on this??? -- View this message in context: http://www.nabble.com/EntityManger-close-against-the-Query-and-lazy-Loading-tp14847417p14847417.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
