OpenJPA
  1. OpenJPA
  2. OPENJPA-2013

columnDefinition for TEXT types ends up in wrong sql statement

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: jpa, sql
    • Environment:
      Ubuntu Natty (11.04), JDK 6

      Description

      When using Hsqldb or Derby in in-memory mode, the generated create statements wil be using a dimension declaration on columns with type TEXT, which seems to be invalid.

      Entity definition:
      [...]
      @Column(columnDefinition = "TEXT")
      public String getText()

      { return text; }

      [...]

      OpenJPA hsqldb TRACE:
      807 relege-testcycle TRACE [main] openjpa.jdbc.SQL - <t 1227469025, conn 2083747981> executing stmnt 389001391 CREATE TABLE houses_descriptions (id INTEGER NOT NULL, locale VARCHAR(5), name VARCHAR(255), text TEXT(255), house_id INTEGER, PRIMARY KEY (id))

      Testing this with a MySQL DB (5.1), the problem does not occur. Here, sql create statements are formed without the dimension declaration on TEXT types:

      OpenJPA mysql TRACE:
      1017 relege-development TRACE [main] openjpa.jdbc.SQL - <t 1372096729, conn 680220284> executing stmnt 1406860207 CREATE TABLE houses_descriptions (id INTEGER NOT NULL, locale VARCHAR(5), name VARCHAR(255), text TEXT, house_id INTEGER, PRIMARY KEY (id)) TYPE = innodb

        Activity

        Jakob Hohlfeld created issue -
        Michael Dick made changes -
        Field Original Value New Value
        Assignee Michael Dick [ mikedd ]
        Michael Dick made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.0 [ 12315910 ]
        Resolution Fixed [ 1 ]
        Michael Dick made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Michael Dick
            Reporter:
            Jakob Hohlfeld
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development