On Sep 11, 2007, at 5:34 AM, KyleJ wrote:
> > I get the same result with this in 0.3.10 and 0.4beta5.... > > Basic idea: I have two tables which hold various data and a third > table which let's different rows in each table be related to another > (many-to-many relationship). as far as the way youre doing it below, you dont need foreign_keys when using the "secondary" table....however, since your secondary table has its own identity as well as other columns, its not feasable as a secondary table. So at the very least, you want to be using the "association object" pattern described at http://www.sqlalchemy.org/ docs/04/mappers.html#advdatamapping_relation_patterns_association . but beyond that, it seems like youre trying to do a polymorphic association. This isnt a built-in feature of SA but I do have a blog entry describing both ActiveRecord's approach (sort of like what youre doing here) as well as a version that maintains referential integrity: http://techspot.zzzeek.org/?p=13 . - mike --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---