DDC-547: Consider allowing custom PersistentCollection implementations #674

Closed
opened 2026-01-22 12:46:23 +01:00 by admin · 10 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 27, 2010).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user romanb:

We should consider allowing the configuration of custom PersistentCollection implementations on a per-association basis.
This could allow users to craft optimized (SQL) behavior for for some of their collections to improve performance without changing the domain model code.

For this, PersistentCollection needs to be designed for inheritance.

Originally created by @doctrinebot on GitHub (Apr 27, 2010). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user romanb: We should consider allowing the configuration of custom PersistentCollection implementations on a per-association basis. This could allow users to craft optimized (SQL) behavior for for some of their collections to improve performance without changing the domain model code. For this, PersistentCollection needs to be designed for inheritance.
admin added the New FeatureCan't Fix labels 2026-01-22 12:46:23 +01:00
admin closed this issue 2026-01-22 12:46:23 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 26, 2010):

Comment created by romanb:

Rescheduled for 2.1. Might be 2.x.

@doctrinebot commented on GitHub (Aug 26, 2010): Comment created by romanb: Rescheduled for 2.1. Might be 2.x.
Author
Owner

@doctrinebot commented on GitHub (Dec 24, 2010):

Comment created by @beberlei:

Reschedule for 2.x

@doctrinebot commented on GitHub (Dec 24, 2010): Comment created by @beberlei: Reschedule for 2.x
Author
Owner

@doctrinebot commented on GitHub (May 20, 2014):

Comment created by Wilt:

Any progress on this new feature?

@doctrinebot commented on GitHub (May 20, 2014): Comment created by Wilt: Any progress on this new feature?
Author
Owner

@doctrinebot commented on GitHub (May 20, 2014):

Comment created by @ocramius:

This can't be solved in the 2.x series because of the tight coupling between association UnitOfWork logic and the PersistentCollection API.

@doctrinebot commented on GitHub (May 20, 2014): Comment created by @ocramius: This can't be solved in the `2.x` series because of the tight coupling between association `UnitOfWork` logic and the `PersistentCollection` API.
Author
Owner

@Arkemlar commented on GitHub (Mar 5, 2017):

@ocramius can you give recommendation about how to make workaround of this limitation? Custom collections is really needed in domain logic.

@Arkemlar commented on GitHub (Mar 5, 2017): @ocramius can you give recommendation about how to make workaround of this limitation? Custom collections is really needed in domain logic.
Author
Owner

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

There is no possible workaround right now.

On 5 Mar 2017 3:57 p.m., "Yanosh" notifications@github.com wrote:

@ocramius https://github.com/ocramius can you give recommendation about
how to make workaround of this limitation? Custom collections is really
needed in domain logic.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/doctrine/doctrine2/issues/5057#issuecomment-284233242,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakJyx3QXHo3V8P9x-iKE7sRWFnWUGks5ris1MgaJpZM4MTb52
.

@Ocramius commented on GitHub (Mar 6, 2017): There is no possible workaround right now. On 5 Mar 2017 3:57 p.m., "Yanosh" <notifications@github.com> wrote: > @ocramius <https://github.com/ocramius> can you give recommendation about > how to make workaround of this limitation? Custom collections is really > needed in domain logic. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/doctrine/doctrine2/issues/5057#issuecomment-284233242>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAJakJyx3QXHo3V8P9x-iKE7sRWFnWUGks5ris1MgaJpZM4MTb52> > . >
Author
Owner

@Itach1Uchixa commented on GitHub (Jul 6, 2018):

Little workaround @Arkemlar : https://gist.github.com/Itach1Uchixa/83fedd850e4705b0b51589afaefdfdf1

@Itach1Uchixa commented on GitHub (Jul 6, 2018): Little workaround @Arkemlar : https://gist.github.com/Itach1Uchixa/83fedd850e4705b0b51589afaefdfdf1
Author
Owner

@hugochinchilla commented on GitHub (Nov 5, 2019):

Any progress on this?

@hugochinchilla commented on GitHub (Nov 5, 2019): Any progress on this?
Author
Owner

@Ocramius commented on GitHub (Nov 5, 2019):

@hugochinchilla no, this is likely not going to be solved for 3.x either due to its complexity

@Ocramius commented on GitHub (Nov 5, 2019): @hugochinchilla no, this is likely not going to be solved for 3.x either due to its complexity
Author
Owner

@Ocramius commented on GitHub (Nov 5, 2019):

Gonna close here as "won't fix".

While the feature is a "most wanted", having a placeholder isn't useful until someone comes up with an implementation plan that is viable and that can be attempted.

Please open a new issue if you have an approach that you think could work (considering lazy-loading and UnitOfWork semantics).

@Ocramius commented on GitHub (Nov 5, 2019): Gonna close here as "won't fix". While the feature is a "most wanted", having a placeholder isn't useful until someone comes up with an implementation plan that is viable and that can be attempted. Please open a new issue if you have an approach that you think could work (considering lazy-loading and `UnitOfWork` semantics).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#674