I wonder if this is possible,
i have a Class A with Id property of class B connected with lazy many-to-one relation.
And i want to get A.B.ID without connecting to database(For sure without loading whole B entity). Is is possible in NhibernatE?
A is many and b is One 🙂
Thx.
Yes this is the default behavior. If you retrieve
Afrom the database then accessA.B.Idthis will not hit the database. If you access any other property besides the Id field it will cause NHibernate to retrieveBfrom the database.