Am Donnerstag, den 20.08.2009, 18:59 -0700 schrieb fachhoch: > Is this is a good design or using DTO is a good desing ?
it depends.. (IMHO there are only some situations where you can see some benefit in DTO) .. but you have to use LoadableDetachableModels or custom Model implementations to avoid LazyLoadingExceptions for short: --------------------------- request comes in { open session for hibernate in OSV } render compontent ask model for data model get it from hibernate with primary key render finished throw temporary data away call detach() on model model clears any reference to the hibernate object { close session for hibernate in OSV } response goes out --------------------------- mm:) > > > Mathias Nilsson wrote: > > > > You can use entities as models. Just use LoadableDetachableModels to avoid > > LazyLoadingExceptions > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org