I saw the same issue when upgrading a system with a legacy db and i didnt bother to report it because it is just wrong. I cant think any scenario where any part of the composite id could be null.
2011/2/7, Ankit <[email protected]>: > After upgrade to NH3, I am having issues using compositeid when part > of the key (from the database) is null. > > CompositeId is defined in class map is as following: > CompositeId() > .KeyProperty(x => x.ApplicationId, "AppId") > .KeyProperty(x => x.ClientId, "ClientId"); > > and the class overrides Equal and GetHashCode methods. ClientId is a > nullable field in the database. > > If the call to Get returns this record >> > AppId | ClientId > 777 | null > > NH fails to map result of the query to the object. Hence the result is > a list with one null element. > > Instead it should be a list with one element with property > ApplicationId = 777. > > Again, this worked fine before the upgrade. Any help will be greatly > appreciated. > > Thanks. > > Ankit > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Enviado desde mi dispositivo móvil -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
