I'm having trouble using in_ to select a bunch of related objects -
here is what I want:

Quick overview of my model (shortened for simplicity):
#Autoloaded table defs go here and aren't really important

class Person(object):
    pass

class EMailAddress(object):
    pass

orm.mapper(Person, person_table, properties = {
        'name': orm.column_property(person_table.c.first_name + " " +
person_table.c.last_name)
})

orm.mapper(EMailAddress, email_table, properties = {
        'person': orm.relation(Person, lazy=False,
                backref=backref('email_addresses', lazy=False))
})



I want to be able to do something like this:
people = [person1, person2, person3]

addresses = Session.query(EMailAddress).filter(Person.in_(people))

When I try it, I get an AttributeError: "type object 'Person' has no
attribute 'in_'"

I'm running 0.5.0rc2

Is this possible?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to