Uploaded image for project: 'Offre de formation'
  1. Offre de formation
  2. ODF-996

[Export SQL] : Erreur lors de l'export SQL lié à un champ "domaine-discipline"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3.0
    • 2.3.0
    • None
    • None

      J'ai un champ "domaine-discipline", la requête de création dans Mysql échoue ->

      Requête exécutée :

      CREATE TABLE odf_program_enum_domain-discipline (key_enum VARCHAR(255) PRIMARY KEY NOT NULL COMMENT 'Clé de l\'enumerateur' , value_enum_domain-discipline TEXT) ENGINE=MYISAM COMMENT 'Table de l\'énumérateur domain-discipline liée à la table odf_program'
      

      Erreur ->

      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-discipline (key_enum VARCHAR(255) PRIMARY KEY NOT NULL COMMENT 'Clé de l\'enum' at line 1
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
      	at com.mysql.jdbc.Util.getInstance(Util.java:381)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
      	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.ametys.odf.export.ExportManager.executeSqlQueries(ExportManager.java:412)
      	at org.ametys.odf.export.ExportManager.export(ExportManager.java:200)
      	at org.ametys.odf.export.ODFExportEngine.export(ODFExportEngine.java:186)
      	at org.ametys.odf.export.ODFExportEngine.run(ODFExportEngine.java:104)
      	at java.lang.Thread.run(Thread.java:662)
      

            lbouchet Loïc Bouchet
            lperier Laurence Perier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: