Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: 3.0
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      A Collection is like a php array, an ordered map. Hence there should be the possibility to persist this order.

        Issue Links

          Activity

          Hide
          Thomas Tourlourat - Armetiz added a comment -

          Hi there,
          After several discussions. on IRC, I have changed my point of view.

          Doctrine Documentation says : "When working with collections, keep in mind that a Collection is essentially an ordered map (just like a PHP array)".
          So, I think that Doctrine have to be able to store or not the order of a Collection. By adding a new field on the Joined table to store the position of each elements.

          But I not agree with @Nicolas. Because in his case, he's talking about Association Class : http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Association+Class/
          Because he's talking of a business logic, he's talking of a dedicated Entity class.

          What do you think about it ?

          Thomas;

          Show
          Thomas Tourlourat - Armetiz added a comment - Hi there, After several discussions. on IRC, I have changed my point of view. Doctrine Documentation says : "When working with collections, keep in mind that a Collection is essentially an ordered map (just like a PHP array)". So, I think that Doctrine have to be able to store or not the order of a Collection. By adding a new field on the Joined table to store the position of each elements. But I not agree with @Nicolas. Because in his case, he's talking about Association Class : http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Association+Class/ Because he's talking of a business logic, he's talking of a dedicated Entity class. What do you think about it ? Thomas;
          Hide
          Thomas Tourlourat - Armetiz added a comment -

          Any news ?

          Show
          Thomas Tourlourat - Armetiz added a comment - Any news ?
          Hide
          Matthieu Napoli added a comment -

          Hi, any news on this?

          If I may add any info to this feature request, maybe something like JPA/Hibernate could be a good start?

          See http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html or http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections.html#collections-indexed

          The idea in Hibernate is that you persist the order of the list in an extra column. This column is not a field of the entity however.

          Show
          Matthieu Napoli added a comment - Hi, any news on this? If I may add any info to this feature request, maybe something like JPA/Hibernate could be a good start? See http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html or http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections.html#collections-indexed The idea in Hibernate is that you persist the order of the list in an extra column. This column is not a field of the entity however.
          Hide
          Albert Casademont added a comment -

          +1, this would be indeed a very nice thing. We are using the @OrderBy annotation as a workaround but it's not quite the same thing

          Show
          Albert Casademont added a comment - +1, this would be indeed a very nice thing. We are using the @OrderBy annotation as a workaround but it's not quite the same thing
          Hide
          Marco Pivetta added a comment -

          Moved to 3.x

          Show
          Marco Pivetta added a comment - Moved to 3.x

            People

            • Assignee:
              Roman S. Borschel
              Reporter:
              Roman S. Borschel
            • Votes:
              15 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated: