which should be the concept ?

   1. please don't say me I'm doing something wrong
   2. please give me an inconsistent result (the collection/instance have
   data but give me a null)


On Fri, Oct 28, 2011 at 9:03 AM, Victor Mingueza
<[email protected]>wrote:

> Hi, can you resolve me a dude about this possiblity in NHibernate
>
> You have checked the code for the BasicLazyInitializer class, there
> are any posibility, that this class don“t throw the
> LazyInitializationException without attach a new session?
>
> If you have been working with EF Code First if the LazyLoading is
> disabled, doesn`t throw any exception, only returns null. This
> behaviour could be the expected if you want to serealize an entity
> throw a WCF service and only serialize preloaded values. Or better at
> the style of NHibernate; this option can be configurable?
>
>  At the documentation of java Hibernate says this
> "Persistent objects and collections
> Short-lived, single threaded objects containing persistent state and
> business function. These can be ordinary JavaBeans/POJOs. They are
> associated with exactly one org.hibernate.Session. Once the
> org.hibernate.Session is closed, they will be detached and free to use
> in any application layer (for example, directly as data transfer
> objects to and from presentation). Chapter 11, Working with objects
> discusses transient, persistent and detached object states."
>
> I know that is better a DTO layer, but for some applications this is
> soo expensive.
>
> Thanks,




-- 
Fabio Maulo

Reply via email to