New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyFieldIsUniqueInCollectionConstraint fails when loading a new object #88

hisystems opened this Issue Aug 25, 2013 · 0 comments


None yet
1 participant

hisystems commented Aug 25, 2013

KeyFieldIsUniqueInCollectionConstraint fails for a new object because @@IDENTITY returns a DECIMAL and there is an equality test with the value from the database for usually an INT field. Therefore (DECIMAL)1 and INT(1) are not considered equal and the constraint incorrectly fails.

This does not affect situations where the object is reloaded and then saved because the DistinctValue will be of the correct INT type.

@ghost ghost assigned hisystems Aug 25, 2013

@hisystems hisystems closed this in cc867ae Aug 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment