Re: [SQLObject] Objects with localized properties
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-05-07 21:56:37
|
On Wed, 2003-05-07 at 15:20, Luke Opperman wrote: > This leads me to a vague desire I've had for a while: to be able to do > selects over joins (really, a filter). Conceptually, something > equivalent to: > > def name(self, lang): > return [ x for x in self.productNames if x.lang == lang ][0] > > although I'd like a cleaner way to add the condition. > > def name(self, lang): > return self.productNamesWhere(q.lang == lang)[0] > > except this gets into the mess (which i don't entirely mind) of the > SelectResults system... I think I understand, and it shouldn't be too hard. I want to make joins a bit more powerful anyway (in terms of adding methods to the class). Can you give a few more use cases? That would make it easier for me to figure out the interface. Ian |