On Thu, Mar 20, 2008 at 6:58 PM, Chris Curvey <[EMAIL PROTECTED]> wrote: > > Hmm, it appears that you cannot use inheritance if the base class > references a table in another schema (I'm using postgres for a back > end). Given this code (and assuming that the "test" schema exists). > > > import elixir as e > e.metadata.bind = "postgres://@/foobar" > > class BaseStage(e.Entity): > e.using_options(tablename="base_stage", inheritance="multi") > e.using_table_options(schema="test") > > row_id = e.Field(e.Integer, primary_key=True) > base_thing = e.Field(e.String(20)) > > class StageOne(BaseStage): > e.using_options(tablename="stage_one", inheritance="multi") > e.using_table_options(schema="test") > > stage_one_thing = e.Field(e.String(20)) > > class StageTwo(BaseStage): > e.using_options(tablename="stage_two", inheritance="multi") > e.using_table_options(schema="test") > > stage_two_thing = e.Field(e.String(20)) > > e.setup_all() > > I get an error message: > > sqlalchemy.exceptions.InvalidRequestError: Could not find table > 'base_stage' with which to generate a foreign key.
Fixed in trunk (r318). Thanks for reporting and sorry that it took me so long to answer this mail. I'm a bit busy these days. -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
