mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1993: New method required: ClassMetadataInfo::isAssociationNullable() #2515
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Aug 22, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user gregoire_m:
Hi,
I'm working with Symfony 2.1, and I need to know if an association is nullable for a given entity (to know if a form field should be marked as 'required'). So I'd like to have a
isAssociationNullable()method in theClassMetadataInfoclass, that should do the same thing that theisNullable()method does for fields.You can see more information about the problem on the Symfony issue.
Thanks.
@beberlei commented on GitHub (Dec 5, 2020):
You can detect this from the join columns of the association.