Re: Insert at a particular position in the detail list

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Sep 26 2008 - 11:34:48 EDT

  • Next message: Michael Gentry: "Re: Insert at a particular position in the detail list"

    I think it does. If it suddenly changes behind the scenes, it can be
    confusing. So I am not 100% opposed to it, but I feel like having it
    in a default cgen template is probably put some burden on us to make
    it work.

    Andrus

    On Sep 26, 2008, at 6:19 PM, Chris Murphy wrote:
    > 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
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Sep 26 2008 - 11:35:22 EDT