You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported under #2244, incorrect query is generated for
var selectedProducts = new[] { productDefinition1 };
var query = session.Query<Material>()
.Where(x => selectedProducts.Contains(x.ProductDefinition) && selectedProducts.Select(y => y.MaterialDefinition).Contains(x.MaterialDefinition));
.Select(y => y.MaterialDefinition) is ignored and IDs of product definitions are inserted into the list of material definitions, i.e. SQL contains query to the effect of ... where MaterialDefinitionId in (ProductDefinitionId1, ProductDefinitionId2, ...).
Originally reported under #2244, incorrect query is generated for
.Select(y => y.MaterialDefinition)
is ignored and IDs of product definitions are inserted into the list of material definitions, i.e. SQL contains query to the effect of ...where MaterialDefinitionId in (ProductDefinitionId1, ProductDefinitionId2, ...)
.Original standalone unit test: https://github.com/v-kabanov/Nh526QueryBug/blob/68498cf1f440db8694474f1b55a5efa31be2ae41/MyTest.cs#L207
New unit test integrated in a fork of NH repo added in commit v-kabanov@133b26d
It runs and fails but needs some further development.
The text was updated successfully, but these errors were encountered: