ForeignKey between 2 schemas, 1 with prefix one without prefix, tries to link to wrongly prefixed table #630

stijnr opened this Issue Mar 13, 2013 · 0 comments


None yet

1 participant

stijnr commented Mar 13, 2013

Here are my 2 schemas:


<database name="default" namespace="My\CoreBundle\Model" defaultIdMethod="native" schema="general">
    <table name="institution">
      <column name="id" type="INTEGER" primaryKey="true" autoIncrement="true" />
      <column name="name" type="VARCHAR" size="255" primaryString="true" required="true" />


<database name="default" namespace="Oim\CoreBundle\DKO" defaultIdMethod="native" tablePrefix="dko_" schema="dko" >
    <table name="admin_group">
      <column name="id"                       type="INTEGER" primaryKey="true" autoIncrement="true" />
      <column name="institution_id"           type="INTEGER" required="true" />
      <foreign-key foreignTable="institution" foreignSchema="general">
        <reference local="institution_id" foreign="id" />

And the error:
Table "dko_admin_group" contains a foreign key to nonexistent table "general.dko_institution"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment