'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,
        #            user_stratigraphies.c.id_str==stratigraphies.c.id,
        #            stratigraphies.c.id_tec==tech_elements_classes.c.id,
        #            tech_elements_classes.c.id_tu==transm_limits.c.id_tu,
        #            ),

this fails because you aren't joining to the table to which SurfaceRes is 
mapped, "surface_res".



On Aug 1, 2011, at 7:02 AM, neurino wrote:

> 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 `viewonly=True`
> initialization fails.
> 
> I just need these to get (not even set) some values with convenience
> of SA attributes.
> 
> I published a working example on pastebin:
> 
> http://pastebin.com/RsZ6GCRq
> 
> I hope someone can sort out this thing, thank you.
> 
> Greetings
> neurino
> 
> -- 
> 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.
> 

-- 
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