On Dec 4, 6:35 pm, "Kevin Cole" <[EMAIL PROTECTED]> wrote: > Since I'm trying to wrap my head around things with a "TurboGears in > 20-minutes" attitude, I'm trying to work with relatively simple stuff. > So, using Elixir, I want the best way to do something like: > > SELECT DISTINCT rank, usps, name FROM states WHERE rank < 60 ORDER BY rank; > > and have everything fit nicely into the model class States without me > reinventing the wheel.
I think what you want is not really going to fit. The nature of DISTINCT doesn't really map to whole entities - which one should it return when several are not 'distinct'? If it picks some arbitrarily, then the values you get back in the other columns aren't going to be deterministic and probably aren't much use to you. With that in mind, I don't see any problem with the original snippet you posted. -- Ben Sizer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

