Hi, I've been to the IRC channel and gotten alot of help from "inklesspen", 
but I can't seem to figure this out.

I have these tree tables;

Users
 - iduser
 - name

Companies
 - idcompany
 - name

CompaniesUsers
 - companyid
 - userid
 - owner (TINYINT|Boolean)


Now in my "Company" class I want users to select all users that are not 
owners. Something like this;
*select * from users u where u.iduser in (select userid from companiesusers 
cu where cu.companyid = 1 and cu.owner = 0);*

I've tried playing around with association_proxy and relationships but I 
want seems to properly add the two together. 
Here is a sample of one of my tries;
https://gist.github.com/anonymous/11293742

Would be grateful if anyone could give me some hints, and I would love an 
example.
The examples in the docs are great, but they don't explain how do "use them 
together".

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to