Fluent Nhibernate, References and too many queries
When I add a Reference in my map the SQL generated fetches the foreign object with an outer left join. This gives good performance with only 1 SQL.
But when the referenced object does not exists on N rows NHibernate generates N extra queries to look up the non existing row. It should know it doesn't exists from the first query.
How do I disable this behavior?
References(x => x.Customer)
.Columns("c1", "c2")
.NotFound.Ignore();
Its a feature not a bug! https://nhibernate.jira.com/browse/NH-1001
链接地址: http://www.djcxy.com/p/61000.html