openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucas Smith (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENJPA-2186) Sequences are not removed in DerbyDB
Date Sun, 06 May 2012 15:39:48 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lucas Smith updated OPENJPA-2186:
---------------------------------

    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.


  was:
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.



    
> Sequences are not removed in DerbyDB
> ------------------------------------
>
>                 Key: OPENJPA-2186
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2186
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Lucas Smith
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message