[sqlalchemy] Re: ordering list: list order not updated on delete (orm)

2009-07-08 Thread wobsta
Hi, just for the records: I've came up myself with an alternative solution to store an ordered list. The basic idea is to calculate order keys from a set of characters such that I can always insert items in front of the list and at the end of the list and also between any two items. I never need

[sqlalchemy] Re: ordering list: list order not updated on delete (orm)

2009-07-06 Thread Michael Bayer
wobsta wrote: > > On 4 Jul., 17:05, Michael Bayer wrote: >> remove the item using remove().  What's the "items must be in a list   >> rule", the not nullable foreign key ?  thats what "delete-orphan"   >> cascade is for, its in the tutorial and reference documentation. > > Thanks, this works for

[sqlalchemy] Re: ordering list: list order not updated on delete (orm)

2009-07-06 Thread wobsta
On 4 Jul., 17:05, Michael Bayer wrote: > remove the item using remove().  What's the "items must be in a list   > rule", the not nullable foreign key ?  thats what "delete-orphan"   > cascade is for, its in the tutorial and reference documentation. Thanks, this works for the simple case in my fi

[sqlalchemy] Re: ordering list: list order not updated on delete (orm)

2009-07-04 Thread Michael Bayer
On Jul 4, 2009, at 2:21 AM, wobsta wrote: > > Hi, > > in my following example I don't know how to properly delete items in > an ordered list. I can't call items.remove (as I would violate the > "items must be in a list rule"). remove the item using remove(). What's the "items must be in a list