Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0-ALPHA3
-
Fix Version/s: None
-
Component/s: ORM
-
Security Level: All
-
Labels:None
Description
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.
I think is a more general improvement for persisting the order / the keys of any collection.
This is not trivial though. I dont think it can make it into 2.0 but I will schedule it for 2.1.