On Oct 2, 3:41 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> Thomas Drake wrote:
>
> > primary = dep_groups.join(dep_group_components,
>
> > dep_groups.c.group_id==dep_group_components.c.group_id).join
> > (dependencies_table,
>
> > dep_group_components.c.group_id==dependencies_table.c.parent_id)
> > secondary = dep_groups.join(dep_group_components,
>
> > dep_groups.c.group_id==dep_group_components.c.group_id).join
> > (dependencies_table,
>
> > dep_group_components.c.group_id==dependencies_table.c.child_id)
>
> why is all the above join construction needed ?  I see three classes but
> only two mappers.   So I get the impression you're trying to say
>
> Component -> DependencyHolderGroup -> Group ?  in which case map all three
> classes explicitly, and two relation()s to bridge them together.
>
> Also I'd advise upgrading to 0.5.6 as there are many bug fixes since 0.5.3
> including within the area of joined table inheritance mapping.

DependencyHolderGroup is an abstract type for classes like Component,
so I'm was thinking I didn't need a mapper for it.

Otherwise, the join construction was my fix for the errors where the
relation can't relate the base classes group_id column with the
parent_id within the primaryjoin.

Thanks for getting back. I'll update and try your approach.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to