If I set LazyLoad on multiple properties-columns with NHiberante and access those properties one after the other, would it query the database for each property?
Example:
public class Product
{
public virtual int ID {get; set;}
public virtual string Name {get; set;}
public virtual string FullName {get; set;}
public virtual float Price {get; set;}
}
public class ProductMap : ClassMap<Product>
{
Id(p => p.ID);
Map(p => p.Name).Not.LazyLoad();
Map(p => p.FullName).LazyLoad(); // Redundant - I know...
Map(p => p.Price).LazyLoad(); // Redundant - I know...
}
if I query the DB like this:
var product = session.Load<Prodct>(2);
if (product.FullName == "*" && product.Price = 111)
Will there be 3 queries
- The Product entity
- The FullName property
- The Price property
or when NHibernate query the DB for FullName it will query all the columns of the row?