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

Sequences are not removed in DerbyDB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      I have the following code:
      @SequenceGenerator(name="CompanySeqGen", sequenceName="COMPANYSEQUENCE")
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator="CompanySeqGen")

      and following property in persistence.xml file:
      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='drop,add,deleteTableContents',IgnoreErrors=true)" />

      When I generate the schema for the first time everything is OK. However when I do it once again I get exception that sequence 'COMPANYSEQUENCE' already exists. I have to remove this sequence manually using SQL language.

      Tables are dropped and then created, but sequences are not removed.

      Similar problem has already been reported but with different database.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kkcha Lucas Smith
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: