Hi!

I will check out the Object that was posted thanks!

Yes I put the opensessioninview filter before.

I think the problem is this.

Lets say I list all of my items in one page. 

Name, Description
TestName, TestDescription

When clicking the name link I do the following 

setResponsePage( new ItemPage( item ) );

I pass the item object to the constructor. The item has references to store
and some other objects.
The store is never loaded in the previous page and to do
item.getStore().getId() is impossible I will get a lazy loading exception.
What is the solution to this.

I have downloaded the wicket phonebook and see that the id is passed to the
constructor.

Do you always load every object that has a reference to an entity? Example
ItemTranslation has reference to Store, Item 

When editing a ItemTranslation I will pass the object to the Wicket page
constructor. The store and item is not loaded since they are lazy.

What is the approach here? load the store and the item and set them in the
ItemTranslation? This sounds very tedious¨. Any other suggestions. The lazy
loading exception occurs when the entity has reference to lazy entities that
is not loaded in the page. 


-- 
View this message in context: 
http://www.nabble.com/How-to-avoid-Lazy-loading-exception-tp17040941p17062281.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to