Skip to content

Move JoinColumn nullability check to drivers#8726

Closed
Lustmored wants to merge 2 commits intodoctrine:2.9.xfrom
Lustmored:GH-8723
Closed

Move JoinColumn nullability check to drivers#8726
Lustmored wants to merge 2 commits intodoctrine:2.9.xfrom
Lustmored:GH-8723

Conversation

@Lustmored
Copy link
Copy Markdown
Contributor

This is a draft solution for #8723. This PR moves nullable logic on JoinColumn from ClassMetadataInfo to drivers and implements reflection fallback for Annotation and Attribute drivers.

Logic here is to use property nullability if and only if there are JoinColumn annotation/attributes that doesn't have nullable set, thus limiting possible BC to situation when JoinColumn is set without nullable and the property is not nullable.

This logic can be extended to other drivers if desired. Also I didn't add any tests (yet!) to get the approach reviewed first.

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.

2 participants