Cayenne
  1. Cayenne
  2. CAY-477

Support for preordered relationships

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Undefined future
    • Fix Version/s: Undefined future
    • Component/s: Core Library, Modeler
    • Labels:
      None

      Description

      This is already supported on the client (PersistentObjectList). Need to either add support for it to ToManyList or migrate DataContext to use PersistentObjectList. In any event Modeler support is needed.

      1. 477-proto.patch
        18 kB
        Andrey Razumovsky

        Activity

        Hide
        Andrey Razumovsky added a comment -

        Here's prototype of how I see the issue.
        Orderings can be added to objRelationship, and they are relative to target entity (e.g. to Painting for "Artist.paintingArray" relationship). For relationships with orderings, resolving returns ordered list.

        Some things to be done:
        (1) Collection methods, like add() addAll() should keep the order.
        (2) Map and Set support
        For (1) and (2) we'll need to introduce different underlying implementation of PersistentObject*
        (3) Modeler support

        (4) Not sure of this --> set() method of collections and changing the object in ordered collection should somehow keep order. This is unseen truth for maps but will be a pain for lists. Do we need this??

        Show
        Andrey Razumovsky added a comment - Here's prototype of how I see the issue. Orderings can be added to objRelationship, and they are relative to target entity (e.g. to Painting for "Artist.paintingArray" relationship). For relationships with orderings, resolving returns ordered list. Some things to be done: (1) Collection methods, like add() addAll() should keep the order. (2) Map and Set support For (1) and (2) we'll need to introduce different underlying implementation of PersistentObject* (3) Modeler support (4) Not sure of this --> set() method of collections and changing the object in ordered collection should somehow keep order. This is unseen truth for maps but will be a pain for lists. Do we need this??

          People

          • Assignee:
            Unassigned
            Reporter:
            Andrus Adamchik
          • Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development