Re: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed?

2010-02-04 Thread werner
On 03/02/2010 20:25, Michael Bayer wrote: werner wrote: In my model I have: class Country(BaseExt): pass sao.mapper(Country, createSelect(Country_D, Country_T, 'countries_d_id', ['name', 'url'])) Which I can use like this: for cs in session.query(db.Country).all(): print

RE: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed?

2010-02-04 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of werner Sent: 04 February 2010 09:41 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed? On

Re: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed?

2010-02-04 Thread werner
On 04/02/2010 11:07, King Simon-NFHD78 wrote: ... Just to confirm, were you actually defining your Region_D class exactly like this: class Region_D(Base, CreateUpdateMixin): __tablename__ = u'regions_d' id = sa.Column(sa.Integer(), sa.Sequence('regions_d_id'),

Re: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed?

2010-02-03 Thread Michael Bayer
werner wrote: In my model I have: class Country(BaseExt): pass sao.mapper(Country, createSelect(Country_D, Country_T, 'countries_d_id', ['name', 'url'])) Which I can use like this: for cs in session.query(db.Country).all(): print cs.name, cs.id But I run into problems when