Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-530

sqlite: foreignKey - definition wrong when tables has databasename as prefix

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      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[...]
      

      SQLSTATE[HY000]: General error: 1 near ".": syntax error

      I guess this would be the right query:

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

        Activity

        Andy Rosslau created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.4 [ 10320 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-530, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Andy Rosslau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: