| 
							
					| Beginner |  
					|  |  Joined: Fri Oct 06, 2006 2:49 am
 Posts: 25
 | 
				
					| Hello everybody,
 I have spend some time on the forum and googling and I do not find a solution to this problem.
 
 I am currently struggling to reattach an object to the session.
 
 Here is basically what I do:
 
 
 beginTransaction();
 dao.update(myPersistentObject);
 myPersistentObject.getLazyProperty();
 endTransaction();
 
 
 I get an LazyInitializationException when I am accessing Lazy fields of an object that I just have reattached to the session.
 
 I am in a transaction and I must make an update (not a lock()) because my object has changed.
 
 Does anybody have a suggestion to resolve this problem ?
 
 I do not understand why this is happening because my object is supposed to be reattached and therefore I must be able to access lazily my properties....
 
 tiggy
 
 
 |  |