Hi,
When I create LoadableDetachableModel the onDeatch() and deatch() methods
are never called.
The load method is only called once. Becouse of it I get
LazyInitializationException from Hibernate.
Should I call deatch() manually or is there something wrong with my
LoadableDetachableModel?
Here is a code.
public class ClientLoadableDetachableModel extends LoadableDetachableModel {
private Long clientId;
public ClientLoadableDetachableModel(Long clientId) {
super();
this.clientId = clientId;
}
@Override
protected Object load() {
return Locator.getClientService().findClientById(clientId);
}
public Client getClient() {
return (Client) super.getObject();
}
public Long getClientId() {
return clientId;
}
}
Thanks for help,
Artur
--
View this message in context:
http://www.nabble.com/LoadableDetachableModel---should-I-call-deatch%28%29-manually--tp18335895p18335895.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]