nhibernate-core icon indicating copy to clipboard operation
nhibernate-core copied to clipboard

Make throwing error Cannot simultaneously fetch multiple bags configurable

Open uciprian opened this issue 8 years ago • 1 comments

There are situations data dependent where you want to query multiple bags in the same query but the arity for those bag may still be one due to conditions in the query. Other times for the purpose of fetching eagerly many relationships and dealing with multiplicity due the cartesian products in the application code is desired way to implement. For these 2 reasons I propose throwing the error "Cannot simultaneously fetch multiple bags" configurable. I'm one of the folks who has successfully been using nhibernate 4.0 on a complex domain with this exception throwing removed by building nhibernate myself from sources directly, would like to avoid this in 5.0

Thanks

uciprian avatar Oct 20 '17 19:10 uciprian

Although I personally consider that lazy loading + batching of lazy loads is the way to avoid those troubles while keeping good performances, why not.

You should probably consider submitting a PR for this. See contributing.

fredericDelaporte avatar Oct 21 '17 10:10 fredericDelaporte