Re: [sqlalchemy] Relationship spanning on multiple tables

2011-08-12 Thread Michael Bayer
On Aug 11, 2011, at 6:45 PM, neurino wrote: Sorry if I bother again but adding some others relationships like this spanning on 5 tables: mapper(UserLayer, inherits=base_user_layer_mapper, polymorphic_identity=CLASS_LAYER, properties={ ...

Re: [sqlalchemy] Relationship spanning on multiple tables

2011-08-11 Thread neurino
Sorry if I bother again but adding some others relationships like this spanning on 5 tables: mapper(UserLayer, inherits=base_user_layer_mapper, polymorphic_identity=CLASS_LAYER, properties={ ... 'lca_transport': relationship(LCATransport,

Re: [sqlalchemy] Relationship spanning on multiple tables

2011-08-02 Thread neurino
Sorry Michael, there was a typo in my code, due to some wrong copy/paste or search/replace I guess, I'm afraid. The error I reported comes up mapping to `TransmLimit` and not `SurfaceRes` (which is the one already mapped above). I edited the pastebin: http://pastebin.com/mjfgPrcB now with:

[sqlalchemy] Relationship spanning on multiple tables

2011-08-01 Thread neurino
I'm trying to get some relationships spanning on multiple tables (4 or 5). While I got the `4 tables` one working on first attempt (I was surpized I could...) I can't get the `5 tables` one to work while the code is almost the same. Moreover with the first relationship if I add adding

Re: [sqlalchemy] Relationship spanning on multiple tables

2011-08-01 Thread Michael Bayer
'transm_limit': relationship(SurfaceRes, single_parent=True, #uselist=False, #primaryjoin=and_( #user_stratigraphies.c.id_prov==provinces.c.id, #provinces.c.id_cz==transm_limits.c.id_cz, #