Doctrine 1
  1. Doctrine 1
  2. DC-688

data-load don't work when the primary key is a string

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.2.3
    • Component/s: Import/Export
    • Labels:
      None
    • Environment:
      Windows 7
      MySQL 5.1
      Apache 2.2
      PHP 5.3
      Symphony 1.4.4

      Description

      The export/import system don't work if a table have a primary key string.

      I have this schema :

       
      TypeChampPerso:
        columns:
          id: { type: string(20), primary: true }
          description: { type: string(100), notnull: true }
      

      Here is the result when I extract data with data-dump :

       
      TypeChampPerso:
        TypeChampPerso_date:
          description: Date
        TypeChampPerso_numeric:
          description: Numérique
        TypeChampPerso_text:
          description: Texte
      

      Then, I've got an error when I used data-load :
      SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'

      The id column is empty is the DB.

      It works if I add manually the id value in the yml file :

       
      TypeChampPerso:
        TypeChampPerso_date:
          id: date
          description: Date
        TypeChampPerso_numeric:
          id: numeric
          description: Numérique
        TypeChampPerso_text:
          id: text
          description: Texte
      

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: