Okay, i have got a stupid question.
i have got something like this:

result = Session.query(Messages).filter(
                  Messages.from_user == 1).filter(
                        User.id != 1).all()

This query is supposed to get all the messages ( Messages table) that
have the senders id (from_user) but select ONLY this messages that are
connected to all users except user with id = 1.
This tables are many-to-many( Messages, Messages_Users, Users ). The
relationship is set correctly.

Is this even possible? ;-)

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to