15 May 19:39
Re: Default collection class for unordered relations
From: Nick Murphy <njmurphy <at> gmail.com>
Subject: Re: Default collection class for unordered relations
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-05-15 17:39:14 GMT
Subject: Re: Default collection class for unordered relations
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-05-15 17:39:14 GMT
> if we had a totally explicit "collection class is required" approach, > that would be something different (like, cant use "list" as a > collection unless order_by is present). We might just say in any case > that "order_by" is required with "list"....but then that might be too > steep a change for 0.4 to 0.5, and also it gets a little weird in that > we dont necessarily know how well the collection is list-like/set-like. Yeah, it's definitely tricky, and I could certainly see the behavior as confusing to new users. The pedant in me tends to think that lists are appropriate only when there is an explicit ordering for a collection -- as with orderinglist -- and that sets/multisets should be used in most other circumstances; if an arbitrary order is needed, the collection can be sorted in Python. That said, it's really convenient to not have to worry about that, even if it's not 100% "correct." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy <at> googlegroups.com To unsubscribe from this group, send email to sqlalchemy-unsubscribe <at> googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed