> Indeed, documentation on SelectResults is pretty sparse -
> http://www.sqlobject.org/class-sqlobject.sresults.SelectResults.html is about
> it. I'm a heavy abuser of it, I'll see if I can write up some docs in the next
> few days.

Thanks for the link.  Well, I for one would appreciate any expanded docs!

> Note, it's not that filter knows how to join the tables, it's the clause 
> that's
> already tucked away in self.roles that knows how to do the join. If you print
> self.roles.clause you'll see something like:
> 
> UserRole.userID = 1 AND UserRole.roleID = Role.id
> 
> And if you print self.roles.filter(UserRole.q.active == True).clause you'll 
> see:
> 
> UserRole.userID = 1 AND UserRole.roleID = Role.id AND (UserRole.active = True)
> 
> If you look at the source you'll see that filter is a trivial AND of the
> existing and new clauses.

Very informative.  Thanks again, Luke.  Looks like I have a lot to learn on
here!

Dan


-------------------------------------------------------------------------
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