Hello ,

I am new to nhibernate and am trying to get a collection of objects
from my database.

Here is what Iam trying to do ..

I have a table called load and it has a foreign key to another table
called LoadType.

Now in the mapping load.hbm.xml table here is what I have in place.

    <many-to-one name="LoadType"   cascade="save-update"
column="`LoadtypeId`"></many-to-one>

Now when I get the collection and try and access the description
property in the LoadType table

LblLoadType.Text = dataItem.LoadType.Description;

I get the error  " Object reference not set to an instance of an
object. "

I tried with the lazy option being

Lazy = false
Lazy = proxy
Lazy = no-proxy

But I still get the same error.

Can some one help me please. ?

Thanks in advance.
Ashwin


-- 
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