Skip to content
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

Closed
hisystems opened this issue Aug 25, 2013 · 0 comments
Closed
Assignees

Comments

@hisystems
Copy link
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant