DDC-181: Order of many-to-many relationship #223

Open
opened 2026-01-22 12:31:22 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 28, 2009).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user amirabiri:

I've come across the need for this in a scenario which is analogous to orders / products.

I've got an "order" which is linked to one or more "products". However the order (position) in which the products appear in the order is significant. Therefore I have a "position" field in the join table.

The requirement is:

  • To map the order of the array to values of the "position" field in the join table upon save.
  • To hydrate the array ordered by the position field when hydrating the object.
Originally created by @doctrinebot on GitHub (Nov 28, 2009). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user amirabiri: I've come across the need for this in a scenario which is analogous to orders / products. I've got an "order" which is linked to one or more "products". However the order (position) in which the products appear in the order is significant. Therefore I have a "position" field in the join table. The requirement is: - To map the order of the array to values of the "position" field in the join table upon save. - To hydrate the array ordered by the position field when hydrating the object.
admin added the New Feature label 2026-01-22 12:31:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#223