This class (all my classes) is mapped as <class .... lazy="true"
> ....

When lazy is false, exception is thrown
"NHibernate.ObjectNotFoundException: No row with the given
identifier". Ok.

Could someone clarify to me, what are consequences of lazy option on
class level.
If lazy=true on class level, does it mean that all entity properties
will be lazy loaded ?

But if lazy=false on class level, I can set lazy loading only on
collections. Is this the main point of lazy switch on class level ?

On 19 Lut, 12:46, "Tomasz Modelski (IDev)" <[email protected]>
wrote:
> Hi.
>
> As I understand, Session.Load<TEntity>(id) should return proper entity
> or throw exception if entity with such id doesn't exist.
> Is it true ?
>
> Right now I'm debugging code when Session.Load<TEntity>( 0 ) returns
> not-null and doesn't throw exception, and there is not TEntity with id
> 0 in database.
> Returned object is some TEntity proxy with properties throwing
> exceptions when accessed.
>
> I'm using NHibernate v. 2.1.2.4000.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to