[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 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] ordering list: list order not updated on delete (orm)

2009-07-04 Thread wobsta
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"). If I delete the item, the list order get's not updated. Is there a way to automate the necessary reorder call for this case?