Closed dvdwouwe closed 4 years ago
Thanks for the detailed description and the provided unit test. I made a fix for both cases in #2467.
But I'm still trying to reproduce our case, because I believe we have two different cases.
I was able to reproduce the first issue by using an equal operator instead of Contains
method:
.Where(a => a.IdentityNames.Any(n => n == "name1"));
Will this fix be included in the 5.3.2 release?
I appreciate your effort and quick response, thx to @maca88 and @fredericDelaporte, and the nHibernate team-members!
Fixed by #2467
When upgrading from 5.2.7 -> 5.3.1, I noticed we had a problem with a kind of large linq-statement, this is a linq statement build dynamically. I tried already 5.3.2-dev, but no luck.
This is the sql query from 5.2.7 that was generated:
I got this stack-frame on the 5.3.1 package:
After some digging in the stacktrace and the nhibernate code I found out that it had todo with the last generated sql fragment:
Here are our class definition for the two evolved classes:
It seems to fail in MutateRowValueConstructorSyntaxesIfNecessary when they calculate the column-span of the left and right operands. For a collection type you get 0.
So, I tried to create a faling unit-test, but i was surprised that I got a failing unit-test, but not with the same stacktrace we got in our project.
This test is also failing and was quite simple to reproduce. It seems also that GetColumnSpan is returning zero when trying to solve the number of parameters, using GetIdsForBackTrack.
But I'm still trying to reproduce our case, because I believe we have two different cases.