JoinColumn / ManyToOne specify custom ON condition #7153

Open
opened 2026-01-22 15:45:41 +01:00 by admin · 0 comments
Owner

Originally created by @realjjaveweb on GitHub (May 18, 2023).

Feature Request

Q A
New Feature yes
RFC yes/no
BC Break no

Summary

For relations, it is expected that Doctrine\ORM\Mapping\JoinColumn is specified - but JoinColumn expects a relational column, however for some relations it is also needed to specify other join conditions (think something like ON( ... AND (t.state='active'))).
So maybe it's not about altering the JoinColumn, but altering the relation attributes like ManyToOne - have an option to specify some custom joining.

Originally created by @realjjaveweb on GitHub (May 18, 2023). ### Feature Request | Q | A |------------ | ------ | New Feature | yes | RFC | yes/no | BC Break | no #### Summary For relations, it is expected that `Doctrine\ORM\Mapping\JoinColumn` is specified - but `JoinColumn` expects a relational column, however for some relations it is also needed to specify other join conditions (think something like `ON( ... AND (t.state='active'))`). So maybe it's not about altering the `JoinColumn`, but altering the relation attributes like `ManyToOne` - have an option to specify some custom joining.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7153