Doctrine 1
  1. Doctrine 1
  2. DC-955

Loading fixtures containing data for Versionable/Searchable Models fails due to Duplicate-Key errors

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      PHP 5.3.3 / symfony 1.4.9-dev / MySQL 5.0

      Description

      Sample schema:

      Blog:
      actAs: [Versionable, Searchable]
      columns:
      id:

      { type: integer, primary: true, autoincrement: true }

      name: string
      text: text

      When dumping data of a schema with Versionable and/or Searchable Behaviour, the dump.yml will contain all data, including the *_version and *_index tables.

      Trying to load the same .yml file results in Duplicate-Key constraint violations, as long as the data for the *_version and *_index tables is present.
      The import is only successfull, when the data for these tables is discarded.
      This leads to the issue, that one can only do a dump-load cycle, when the complete version history of a Model is discarded. Which makes dump-load for such models rather useless.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Daniel Reiche
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: