8000 primary key columns in join tables must not be nullable by xabbuh · Pull Request #11923 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

primary key columns in join tables must not be nullable #11923

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

Draft
wants to merge 1 commit into
base: 3.3.x
Choose a base branch
from

Conversation

xabbuh
Copy link
Member
@xabbuh xabbuh commented Apr 25, 2025

related to doctrine/dbal#6787

@xabbuh
Copy link
Member Author
xabbuh commented Apr 25, 2025

@derrabus @greg0ire @morozov @stof Before I continue updating a lot of files do we agree that this is supposed to be the way to solve the deprecation?

@morozov
Copy link
Member
morozov commented Apr 25, 2025

@xabbuh could you provide some more context as to why these changes are necessary in this way?

doctrine/dbal#6787 deprecates nullable primary key columns, and columns are non-nullable by default in the DBAL. You're changing referencing columns (that I believe reference primary columns in referenced tables).

Are columns nullable by default in the ORM? If yes, then should you be also changing the primary key columns? If not, then why are these changes necessary?

BTW, thanks for taking care of the DBAL deprecations in the ORM.

@stof
Copy link
Member
stof commented Apr 25, 2025

@morozov the default value for nullable in JoinColumn and Column is not the same in the ORM.

@xabbuh for the case of ManyToMany relation, I'd rather make the ORM ignore the nullable flag of the JoinColumn attributes when they are set explicitly as a nullable field there is a bug anyway, instead of forcing every project out there using explicit join columns for a join table to use a non-default value for the property of the attribute.

@xabbuh
Copy link
Member Author
xabbuh commented Apr 28, 2025

@xabbuh for the case of ManyToMany relation, I'd rather make the ORM ignore the nullable flag of the JoinColumn attributes when they are set explicitly as a nullable field there is a bug anyway, instead of forcing every project out there using explicit join columns for a join table to use a non-default value for the property of the attribute.

@stof You mean treating join columns always as nullable in many-to-many associations no matter what was configured by the user?

@stof
Copy link
Member
stof commented May 2, 2025

@xabbuh I mean always treating them as not nullable (instead of forcing every user to explicitly mark them as not nullable to avoid the deprecation, while that's not the default in the JoinColumn attribute)

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

Successfully merging this pull request may close these issues.

3 participants
0