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

Validate Embeddables in SchemaValidator #8052

Open
beberlei opened this issue Mar 2, 2020 · 1 comment · Fixed by #8291
Open

Validate Embeddables in SchemaValidator #8052

beberlei opened this issue Mar 2, 2020 · 1 comment · Fixed by #8291
Labels
Hacktoberfest Good issue for participating in Hacktoberfest Improvement

Comments

@beberlei
Copy link
Member

beberlei commented Mar 2, 2020

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

The schema validator doesn't currently validate embeddables, which is why you can put associations on embeddables but they are not working anyways and nothing happens. This should be validated and add an error in SchemaValidator::validateMapping().

@beberlei
Copy link
Member Author

You can check for ClassMetadata::$isEmbeddable" and then for count ClassMedatata::$associationMappings` being empty to be valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Good issue for participating in Hacktoberfest Improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant