-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
Throw exception on duplicate database names within a document #1903
Throw exception on duplicate database names within a document #1903
Conversation
2f54468
to
ebc7dda
Compare
I was able to move the check to the metadata class, so we don't need to implement it in every driver 🎉 With this change, we're now throwing an exception if there are two properties with different names mapped to the same field in the database and both are not marked as To allow a mapping references and embedded relationships as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic in mapField()
looks sound. Left a few other comments.
...octrine.ODM.MongoDB.Tests.Mapping.AbstractMappingDriverDuplicateDatabaseNameNotSaved.dcm.xml
Show resolved
Hide resolved
ebc7dda
to
68853f9
Compare
Summary
As described in #924, this adds check to the metadata drivers to ensure that database names are not reused within a document. This check is done in the metadata drivers to ensure that it's still possible to re-declare a field from a parent class to change its mapping.