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

Unique key updating entity #238

Open
manelj opened this issue May 5, 2017 · 1 comment
Open

Unique key updating entity #238

manelj opened this issue May 5, 2017 · 1 comment

Comments

@manelj
Copy link

manelj commented May 5, 2017

I think that if i update an entity changing the value of an "unique" field, save system does not check unique integrity.

@nebulousGirl
Copy link
Contributor

You are right. The validation of the unique constraint is limited to new entities: https://github.com/spotorm/spot2/blob/master/lib/Mapper.php#L1125

I don't know if there is a reason being that, but the code should still be failing at the database level with an exception.

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

2 participants