On Wed, Jan 31, 2007 at 03:33:41PM +0200, Elver Loho wrote:
> On 31/01/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> > On Wed, Jan 31, 2007 at 03:07:34PM +0200, Elver Loho wrote:
> > > class FriendRequest(SQLObject):
> > >   requester = ForeignKey("User", dbName = "requester_id")
> > >   requested = ForeignKey("User", dbName = "requested_id")
> > >
> > > elver = get_user("elver")
> > > requests = FriendRequest.select(FriendRequest.q.requested == elver)
> >
> >    This should work:
> >
> > requests = FriendRequest.selectBy(requested=elver)
> 
> Thanks! That did indeed work.

   If you need .select() this should work, too:

requests = FriendRequest.select(FriendRequest.q.requestedID == elver.id)

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to