[PR #10981] Take ReflectionType::allowsNull into account #12740

Closed
opened 2026-01-22 16:15:01 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/10981

State: closed
Merged: No


This reintroduces the behavior removed in #8732 due to #8723 for 3.0

When you have a column with a typed property, then the null status of the property determines if the column's nullable mapping.

This is only done for fields and not for associations, because often association join columns need to be nullable to be updated later after the insert due to extra update and ordering reasons.

For 2.x, we will make this an opt-in behavior in the DefaultTypedFieldMapper and emit a deprecation if user is not opted-in.

Follow Up:

  • This allows clean up nullable check in computeInsertExecutionOrder and other places mentioned there in a comment.
**Original Pull Request:** https://github.com/doctrine/orm/pull/10981 **State:** closed **Merged:** No --- This reintroduces the behavior removed in #8732 due to #8723 for 3.0 When you have a column with a typed property, then the null status of the property determines if the column's `nullable` mapping. This is only done for fields and not for associations, because often association join columns need to be nullable to be updated later after the insert due to extra update and ordering reasons. For 2.x, we will make this an opt-in behavior in the `DefaultTypedFieldMapper` and emit a deprecation if user is not opted-in. Follow Up: * This allows clean up nullable check in `computeInsertExecutionOrder` and other places mentioned there in a comment.
admin added the pull-request label 2026-01-22 16:15:01 +01:00
admin closed this issue 2026-01-22 16:15:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12740