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 = RelatedJoin('User')
>      label = UnicodeCol()
>
> class User(SQLObject):
>      moneystreams = RelatedJoin('MoneyStream')
>
>
> What I want to do is, given a user (current.user) and a
> label, find the MoneyStream that with that label that
> has that user in its users list.  How do I write the
> select?  Or should I just scan through User.moneystreams?
>
> --David
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> sqlobject-discuss mailing list
> sqlobject-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to