Closed
Description
Hi,
With NH 5.3.2 update Equals method is not working with linq throws "System.NotSupportedException : Boolean Equals(System.Object)" exception.
So we changed to == operator but if field is nullable short its now adding extra cast in sql, earlier it was not with Equals method as expected.
https://github.com/gokhanabatay/NHibernateBugTest/blob/master/NHibernateBugTest/CustomTypeSelectFailsTest.cs
Test Case:
NullableShortFieldIsNullConditionTest
select customer0_.GUID as guid1_1_, customer0_.NAME as name2_1_ from CUSTOMER customer0_ where exists (select addresses1_.GUID from ADDRESS addresses1_ where customer0_.GUID=addresses1_.CUSTOMER_GUID and cast(addresses1_.ADDRESS_TYPE as int4)=?)
v5.2 working as expected test case: NullableShortFieldIsNullConditionTestV5_2