| Author |
failed to lazily initialize a collection of role hibernate3
|
vani venkat
Ranch Hand
Joined: Nov 21, 2006
Posts: 142
|
|
hi
I have one to one mapping between three objects.
Job --> salesRole --> positionTemplate.
I am getting this "failed to lazily initialize a collection of role" error with hibernate 3. i tried to use lazy="false" to force hibernate to load eagerly.
still i get the same error when i try to access position template fields. Here are my hibernate mapping files.
job.hbm.xml
SalesRole.hbm.xml
position template.hbm.xml
Can some one please point out the problem. here is how i am loading Job object.
i tried to use http://today.java.net/pub/a/today/2005/10/11/testing-hibernate-mapping.html?page=last not to load beans lazily. the commented code in above method shows that. that gives the same problem. I have been trying to figure it out for the past two days. appreciate any kind of help regarding this.
thanks
|
SCJP 1.4, SCWCD 1.5
|
 |
vani venkat
Ranch Hand
Joined: Nov 21, 2006
Posts: 142
|
|
hi,
i am retrieving all this information in a DTO, and then comitting the transaction. can some one point out what else is wrong here?
thanks
|
 |
 |
|
|
subject: failed to lazily initialize a collection of role hibernate3
|
|
|