cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Murphy <ch...@strandz.org>
Subject Re: Insert at a particular position in the detail list
Date Fri, 26 Sep 2008 15:19:19 GMT

Isn't it good from the user's point of view for the new DO she created 
to be where she put it? To me this is a good thing regardless of what 
happens when the user or another user does a re-query. Having the extra 
int argument isn't necessarily making all kinds of relational database 
ordering promises.

Andrus Adamchik wrote:
>
> On Sep 26, 2008, at 2:41 AM, Chris Murphy wrote:
>
>> Wouldn't it be a good idea for the generated methods to have the 
>> extra int argument?
>
> It is a bit more involved than that. The problem with including this 
> in Cayenne is that it won't work in a more general case. E.g. if you 
> add an object at a particular index, and the master object is later 
> invalidated and refetched, the order will be lost. Or if it is 
> refetched by another user. So Scott's answer was essentially correct.
>
> We tried to solve it from another angle, by defining a certain column 
> as the "ordering" column to instruct Cayenne to order fetched 
> relationship lists. It is still on the table, but it is also hairy...
>
> For now I can't think of a clean generic solution that would map to a 
> DB. The ordering column is the closest I can think of.
>
> Thanks,
> Andrus
>
>
>

-- 
Seaweed Software Pty Ltd,
http://www.strandz.org


Mime
View raw message