DDC-3853: [GH-1480] Allow custom id generators to handle composite keys #4721

Closed
opened 2026-01-22 14:48:17 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 28, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of kaiwa:

Url: https://github.com/doctrine/doctrine2/pull/1480

Message:

Currently when using composite keys, any other id generation strategy than
NONE (assigned identifiers) is triggering an exception in ClassMetadataInfo.

This commit allows to use the CUSTOM strategy with composite keys, therefore
to allow a custom id generator to handle the composite key identifier
generation.

Originally created by @doctrinebot on GitHub (Jul 28, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of kaiwa: Url: https://github.com/doctrine/doctrine2/pull/1480 Message: Currently when using composite keys, any other id generation strategy than NONE (assigned identifiers) is triggering an exception in ClassMetadataInfo. This commit allows to use the CUSTOM strategy with composite keys, therefore to allow a custom id generator to handle the composite key identifier generation.
admin added the Bug label 2026-01-22 14:48:17 +01:00
admin closed this issue 2026-01-22 14:48:19 +01:00
Author
Owner

@JordyMoos commented on GitHub (Feb 6, 2017):

I need this feature
Its weird that composite key cant have a custom generator

@JordyMoos commented on GitHub (Feb 6, 2017): I need this feature Its weird that composite key cant have a custom generator
Author
Owner

@Ocramius commented on GitHub (Feb 6, 2017):

Try giving it a shot on develop. We won't be implementing this for 2.x

@Ocramius commented on GitHub (Feb 6, 2017): Try giving it a shot on `develop`. We won't be implementing this for 2.x
Author
Owner

@JordyMoos commented on GitHub (Feb 6, 2017):

Oke thanks for responding @Ocramius

@JordyMoos commented on GitHub (Feb 6, 2017): Oke thanks for responding @Ocramius
Author
Owner

@Majkl578 commented on GitHub (Jul 28, 2017):

FYI: With recent changes in develop, it should eventually be possible to have generated values for composite identifiers, mixing multiple generators (i.e. sequence + assigned), or even generators for non-identifier fields (i.e. sequence for non-id field). See ca01b79658 + f482d64d50 for details.

@Majkl578 commented on GitHub (Jul 28, 2017): FYI: With recent changes in `develop`, it should eventually be possible to have generated values for composite identifiers, mixing multiple generators (i.e. sequence + assigned), or even generators for non-identifier fields (i.e. sequence for non-id field). See ca01b79658fa4692cf77ef6c6db222312317c13c + f482d64d50ffec5f7918206f56beb849e48350e2 for details.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4721