You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Lucas Smith (JIRA)" <ji...@apache.org> on 2012/05/06 17:39:48 UTC
[jira] [Created] (OPENJPA-2186) Sequences are not removed in
DerbyDB
Lucas Smith created OPENJPA-2186:
------------------------------------
Summary: 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.
--
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
[jira] [Updated] (OPENJPA-2186) Sequences are not removed in
DerbyDB
Posted by "Lucas Smith (JIRA)" <ji...@apache.org>.
[ 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