> I know ive put many folks through the wringer dealing with this > function, in order to get their inherited mappers to load instances > polymorphically. It seems like we probably dont need it for the > most common case, which is that you are using only joined-table > inheritance from a single common base table (i.e. no concrete- > inheritance), and have a specific column in your base table that > indicates the "polymorphic type". if thats the case, you can > forego the usage of polymorphic_union and just string together your > tables using joins and outerjoins. hah. is this completely replacing punion for the whole table-inheritance-only case, or there are some holes? i'll run my tests (yeah, those annoying thousands of combinations u never liked :-) to see... and will report. The concrete+polymorhic doesn't work anyway (db_id collision), and the mixed concrete+multitable/polymorphic case accordingly.
> conclusions we can draw from this ? I am really, really dumb for > not seeing this for like, the past year. the queries are a lot > easier to create and read, plus we avoid all the other issues > UNIONS bring forth (like same column name but different types > colliding, etc). well, u have paid the bill - all those corresponding_column, column_equivalents etc complications (and i run into those yesterday again, trying to automate expression-generation over a polymorphic base...) ============== some questions arise around the example, trying to generalise it for any levels: - page_join and magazine_page_join are _same_; classifed has just its table as localtable. Should this mean, that genericaly, leafs need just their table, and all non-leafs need same outerjoins of the full hierarchy (i.e. the root one) - how u do a branch in the hierahcy? i.e. to have DocumentPage(page), sibling to magazinePage? cheers svilen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---