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

Documentation regarding the default value of the nullable attribute for JoinColumn is out of sync #11797

Open
pawel-slowik opened this issue Jan 21, 2025 · 0 comments

Comments

@pawel-slowik
Copy link
Contributor

https://www.doctrine-project.org/projects/doctrine-orm/en/3.3/reference/association-mapping.html#mapping-defaults
https://www.doctrine-project.org/projects/doctrine-orm/en/2.20/reference/association-mapping.html#mapping-defaults

This:

Also nullable attribute on JoinColumn will be inherited from PHP type.

is not true. The change that enabled nullability inference was reversed: #8732.

The Annotations Reference chapter in the documentation was updated to reflect the reversal: https://github.com/doctrine/orm/pull/8732/files#diff-73ee81fc89428c88759f9c8cda822ecee129f4deebb9c317f82281d5fae4a74c.
But the Association Mapping chapter was not, probably because the changes there were rolled together as a part of a larger update: b3ed525.

Users who follow the advice of relaying on the defaults and leaving out JoinColumn specification will end up with unexpectedly nullable columns (unless they review DDL statements carefully).

Rixafy added a commit to Rixafy/doctrine-orm that referenced this issue Jan 31, 2025
Rixafy added a commit to Rixafy/doctrine-orm that referenced this issue Jan 31, 2025
Rixafy added a commit to Rixafy/doctrine-orm that referenced this issue Jan 31, 2025
Rixafy added a commit to Rixafy/doctrine-orm that referenced this issue Feb 1, 2025
Rixafy added a commit to Rixafy/doctrine-orm that referenced this issue Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant