Are we going to track property changes of objects? E.g.:
// assume ordered on painting name
Painting p = ...
p.setName("A");
artist.addToPaintings(p);
p.setName("Z"); // should we reorder in this line?
I'd say no (although we can), and this probably means no to (1) and
(4). Although on commit we should probably detect that the ordering
property has changed, and reorder affected lists.
Andrus
On Mar 3, 2010, at 3:32 PM, Andrey Razumovsky (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/CAY-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Andrey Razumovsky updated CAY-477:
> ----------------------------------
>
> Attachment: 477-proto.patch
>
> 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??
>
>> Support for preordered relationships
>> ------------------------------------
>>
>> Key: CAY-477
>> URL: https://issues.apache.org/jira/browse/CAY-477
>> Project: Cayenne
>> Issue Type: Task
>> Components: Core Library, Modeler
>> Affects Versions: Undefined future
>> Reporter: Andrus Adamchik
>> Fix For: Undefined future
>>
>> Attachments: 477-proto.patch
>>
>>
>> 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.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
This archive was generated by hypermail 2.0.0 : Wed Mar 03 2010 - 15:51:49 EST