KeyFieldIsUniqueInCollectionConstraint fails when loading a new object #88

hisystems opened this Issue Aug 25, 2013 · 0 comments


None yet

1 participant


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.

@hisystems hisystems was assigned Aug 25, 2013
@hisystems hisystems added a commit that closed this issue Aug 27, 2013
@hisystems Corrects KeyFieldsIsUniqueInCollectionContraint when used with a save…
…d (not reloaded) object. Closes #88.
@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