Hello everyone,

I want to find emails that have no projects added. 'projects' is an SQLA 
collection in Email class.

So I have this:

unassocusers = session.query(Email).filter(Email.projects == 
[]).order_by(Email.email).all()

And I get this:

InvalidRequestError: Can't compare a collection to an object or 
collection; use contains() to test for membership.

This is again many to many relation:

mapper(Email,email_table, properties={'projects':relation(Project, 
secondary=project_emails_assoc_table, backref='email_project_assoc')}
)

Any way of achieving this?

Regards,
mk




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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