Skip to content

Loading…

DBAL-530: sqlite: foreignKey - definition wrong when tables has databasename as prefix #1737

Closed
doctrinebot opened this Issue · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user rosslau@my-hammer.de:

Because of the fact that SQLite doesn't support multiple databases in one file, Doctrine handles definitions like that:

/****
 * @ORM\Entity()
 * @ORM\Table(name="database.table")
 */

in this way:

CREATE TABLE database**table[...]

But when another Tabele references a table defined like the one above, the foreignkey definition is generated wrong:

[...]FOREIGN KEY (table_id) REFERENCES database.table (id) NOT DEFER[...]

{color:red}SQLSTATE[HY000]: General error: 1 near ".": syntax error{color}

I guess this would be the right query:

[...]FOREIGN KEY (table*id) REFERENCES database_*table (id) NOT DEFER[...]
@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.4 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.