in regard to post-2309 revisions and the foreignkey keyword deprecation...

I know this conversation seems to have terminated as of 2/21, but it's
the only thread that was tracing through a problem i'm having.  I'm
certain my problem is just one of my own lack of understanding on how
to use foreign_keys now, but I'll lay it out there...

I have a legacy table that, in effect, maps to two classes.  A
container-style class and a line items class, which for convenience
we'll just call Container and LineItem.  A Container has_many
LineItem, as you might imagine.  The issue, however, is that the
Container class is mapped against a select statement from that table,
not the table directly, while the LineItem class is mapped against the
table, largely because there's an incrementing LineItem id that's a
primary key on the table, but has no meaning to the Container.

before 2309, I was able to map the lineItem relationship back to the
container class using an explicit primary join and a foreignkey
statement.

I've read through the self-referential example rather a lot, and the
two mailing list threads, and have tried all the combinations and
permutations of primaryjoin, foreign_keys, and remote_side that I can
think of (obviously not all of them or it would have worked ;) ), from
the mappers and relationships on both classes, and I can't seem to
figure out the right way to make it work.  I can send along a
simplified mockup of the relationships and what I've got currently if
anyone has time to take a look, but I may in fact just be heading the
wrong direction...

Any help would be greatly appreciated!
Pete Taylor

-- 
"All guilt is relative, loyalty counts, and never let your conscience
be your guide."
  - Lucas Buck, American Gothic

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