Re: [sqlalchemy] Foreign key reflection error?

2012-05-18 Thread Michael Bayer
On May 18, 2012, at 3:38 PM, Demitri Muna wrote: > Hi Michael, > > On May 18, 2012, at 9:19 AM, Michael Bayer wrote: > >> When using cross-schema reflection, you have the option of either using only >> "public" in your schema search path, or *not* schema-qualifying the tables. >> This is bec

Re: [sqlalchemy] Error "object has no attribute '_sa_instance_state'" - one to many (with fixtures)

2012-05-18 Thread Michael Bayer
On May 18, 2012, at 12:08 PM, Vinz wrote: > Hi all, > I'm writing some tests for my SqlAlchemy DB using the fixtures module, > and I'm currently trying to populate a one to many relationship. > http://farmdev.com/projects/fixture/using-dataset.html#referencing-foreign-dataset-classes > > File "

Re: [sqlalchemy] Foreign key reflection error?

2012-05-18 Thread Demitri Muna
Hi Michael, On May 18, 2012, at 9:19 AM, Michael Bayer wrote: > When using cross-schema reflection, you have the option of either using only > "public" in your schema search path, or *not* schema-qualifying the tables. > This is because when you have the alternate schemas in your search path,

[sqlalchemy] Error "object has no attribute '_sa_instance_state'" - one to many (with fixtures)

2012-05-18 Thread Vinz
Hi all, I'm writing some tests for my SqlAlchemy DB using the fixtures module, and I'm currently trying to populate a one to many relationship. http://farmdev.com/projects/fixture/using-dataset.html#referencing-foreign-dataset-classes We have a relationship between Author and Address : (very much

Re: [sqlalchemy] How should I do inheritance using DeclarativeReflectedBase?

2012-05-18 Thread Michael Bayer
On May 18, 2012, at 9:41 AM, Michael Bayer wrote: > > >> nor sort_on columns in mapper > > order_by? OK, I'm not a huge fan of mapper order_by but we can come up with > something on that the latest tip ensures that __mapper_args__ is not invoked until after the table is reflected and

Re: [sqlalchemy] How should I do inheritance using DeclarativeReflectedBase?

2012-05-18 Thread Michael Bayer
On May 17, 2012, at 6:58 PM, Ignas Mikalajunas wrote: > Small issues so far: > > I can't set neither polymorphic_on set this using a string - polymorphic_on = 'type'. > nor sort_on columns in mapper order_by? OK, I'm not a huge fan of mapper order_by but we can come up with something on t

Re: [sqlalchemy] Foreign key reflection error?

2012-05-18 Thread Michael Bayer
On May 17, 2012, at 7:05 PM, Demitri Muna wrote: > > On May 17, 2012, at 6:33 PM, Michael Bayer wrote: > >> OK this is way too much verbiage. If the error is as you describe, a bug >> involving reflection of two tables across two schemas, I'd need a test which >> illustrates this alone, no O