Re: [sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread Michael Bayer
>> Subject: Re: [sqlalchemy] Two Objects, One Table and the inverse >> >> >> On Apr 5, 2011, at 12:30 PM, Israel Ben Guilherme Fonseca wrote: >> >> >>Thks for the insight Michael. >> >>With the @property solution, its not possible to

RE: [sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread King Simon-NFHD78
> -Original Message- > From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] > On Behalf Of Michael Bayer > Sent: 05 April 2011 18:38 > To: sqlalchemy@googlegroups.com > Subject: Re: [sqlalchemy] Two Objects, One Table and the inverse > > >

Re: [sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread Michael Bayer
On Apr 5, 2011, at 12:30 PM, Israel Ben Guilherme Fonseca wrote: > Thks for the insight Michael. > > With the @property solution, its not possible to make queries like > session.query(Person).filter(Person.address.street="Something") right? that's not possible with standard SQLAlchemy expressi

Re: [sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread Israel Ben Guilherme Fonseca
Thks for the insight Michael. With the @property solution, its not possible to make queries like session.query(Person).filter(Person.address.street="Something") right? Cascade Saving/Updating in that instance should be a problem too. I tested the composite solution, it's nice but the queries get a

Re: [sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread Michael Bayer
On Apr 5, 2011, at 9:06 AM, Israel Ben Guilherme Fonseca wrote: > Hi, > > Is it possible to break a table in two Python objects? Ex: > > Python objects: > > class Person: > > name = Column(String) > > class Address: > > street = Column(String) > city = Column(String) > > > Tab

[sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread Israel Ben Guilherme Fonseca
Hi, Is it possible to break a table in two Python objects? Ex: Python objects: class Person: name = Column(String) class Address: street = Column(String) city = Column(String) Table: table Person name varchar city varchar street varchar How can i make the "connecti