Hibernate version:
Annotations: Version: 3.2.0 CR1, 13.05.2006
Core: version 3.2 cr2, May 5, 2006
EntityManager: Version: 3.2.0.CR1, 13.05.2006
Hi,
How do I force the M side of a 1:M relationship to be read from the database?
I am using an application managed Entity Manager using an extended persistence context.
I have a 1:M relationship between Company and Employee.
company has the API getEmployee() which will return the in memory Employee reference.
I have hibernate.max_fetch_depth set to zero.
I wish to re read the number of employees from the database the company has.
When I do:
em.merge(company) and em.refresh(company)
Only the company is re read.
so how do I re read the number of employees?
Regards
|