DDC-1993: New method required: ClassMetadataInfo::isAssociationNullable() #2515

Closed
opened 2026-01-22 13:55:37 +01:00 by admin · 1 comment
Owner

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 the ClassMetadataInfo class, that should do the same thing that the isNullable() method does for fields.

You can see more information about the problem on the Symfony issue.

Thanks.

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 the `ClassMetadataInfo` class, that should do the same thing that the `isNullable()` method does for fields. You can see more information about the problem on the [Symfony issue](https://github.com/symfony/symfony/issues/5315). Thanks.
admin added the Improvement label 2026-01-22 13:55:37 +01:00
admin closed this issue 2026-01-22 13:55:38 +01:00
Author
Owner

@beberlei commented on GitHub (Dec 5, 2020):

You can detect this from the join columns of the association.

@beberlei commented on GitHub (Dec 5, 2020): You can detect this from the join columns of the association.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2515