Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2358

openjpa-maven-plugin generates wrong sql for derby

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.2.1
    • None
    • tooling
    • None
    • linux (fedora 16, x86_64), oracle jdk 1.7.0_17-b02, Maven 3.0.5, derby 10.9.1.0

    Description

      model object fields are not defaulting to allow null, even when I explicity set @Column(nullable=true), it still generates the columns as "not null".

      As an example :
      @Column(nullable = true, length = 128)
      private String dataType;

      results in generated sql of :
      dataType VARCHAR(128) NOT NULL

      This happens for both org.apache.derby.jdbc.ClientDriver, and org.apache.derby.jdbc.EmbeddedDriver. As a test, I changed the driver to the MySql driver and everything worked as expected so I'm fairly sure this is not a configuration / setup issue unless there's special configuration required for derby.

      Attachments

        1. openjpa_derby_test.tar.gz
          2 kB
          Ted Leung

        Activity

          People

            Unassigned Unassigned
            tedmanleung@gmail.com Ted Leung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: