Re: [SQLObject] how to use sqlobject in operator

2007-05-02 Thread rdmurray
On Wed, 2 May 2007 at 17:11, Oleg Broytmann wrote: > You have already got a piece of advice to loop over user.moneystreams. > This is SQLObject way to do. > If you want to do a join in SQL you have to declare and recreate > intermediate table: > > http://sqlobject.org/FAQ.html#how-can-i-define-

Re: [SQLObject] how to use sqlobject in operator

2007-05-02 Thread Oleg Broytmann
On Mon, Apr 30, 2007 at 09:56:51PM -0400, [EMAIL PROTECTED] wrote: > class MoneyStream(SQLObject): > users = RelatedJoin('User') > label = UnicodeCol() > > class User(SQLObject): > moneystreams = RelatedJoin('MoneyStream') > > What I want to do is, given a user (current.user) and a

Re: [SQLObject] how to use sqlobject in operator

2007-05-01 Thread rdmurray
On Tue, 1 May 2007 at 16:32, Chan Yong Wei wrote: > Wouldn't it simply be > > for ms in current.user.moneystreams: > print ms.label Yes, that is what I am doing (looping and using an if test). And it will be fine, I think, since the number of streams for any given user is not likely to get above

Re: [SQLObject] how to use sqlobject in operator

2007-05-01 Thread Chan Yong Wei
Wouldn't it simply be for ms in current.user.moneystreams: print ms.label ? On 5/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Or at least, that's what it looks like I want to do. > > The relevant part of my model looks like this: > > class MoneyStream(SQLObject): > users = Relate

[SQLObject] how to use sqlobject in operator

2007-04-30 Thread rdmurray
Or at least, that's what it looks like I want to do. The relevant part of my model looks like this: class MoneyStream(SQLObject): users = RelatedJoin('User') label = UnicodeCol() class User(SQLObject): moneystreams = RelatedJoin('MoneyStream') What I want to do is, given a user