we dont have the capability to automatically update ordering columns when the elements of a list are moved around. if you move the elements around, you need to execute some step that will update the index columns (or create a custom collection class that does this for you).
On Apr 9, 2007, at 12:42 PM, Aaron Digulla wrote: > > Hello, > > I'm looking for a feature but couldn't find it in the docs. > > I have a tree like structure where the user can specify the order of > the children of a node. In DB lingo, I have a parentId and an index > column. When I load children, they should be ordered by the index. > This seems to be supported. > > Can SA also update the index column when I move children in the list > around? Like: > > # ... parent has three children A, B C > item = parent.children[0] > del parent.children[0] > parent.children.insert (1, item) > # now, parent has three children B, A, C > > Regards, > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---