Validate Embeddables in SchemaValidator #6418

Open
opened 2026-01-22 15:32:52 +01:00 by admin · 1 comment
Owner

Originally created by @beberlei on GitHub (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().

Originally created by @beberlei on GitHub (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()`.
admin added the ImprovementHacktoberfest labels 2026-01-22 15:32:52 +01:00
Author
Owner

@beberlei commented on GitHub (Sep 25, 2020):

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

@beberlei commented on GitHub (Sep 25, 2020): You can check for `ClassMetadata::$isEmbeddable" and then for count `ClassMedatata::$associationMappings` being empty to be valid.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6418