cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Created] (CAY-2157) Smart AUTO_PK_SUPPORT generation
Date Tue, 29 Nov 2016 15:58:58 GMT
Andrus Adamchik created CAY-2157:

             Summary: Smart AUTO_PK_SUPPORT generation
                 Key: CAY-2157
             Project: Cayenne
          Issue Type: Bug
         Environment: Derby, Unit test environment
            Reporter: Andrus Adamchik
            Priority: Minor

I am using bootique-cayenne-test to setup integration tests in my app. Models come from 2
DataMaps, and Bootique runs DbGenerator for each map. On the second path I am getting the
exception below. Luckily it is caught and ignored, still the test log looks bad. 

There are two issues here:

* DbGenerator (or whatever adapter-generated code it executes) doesn't check for the table
presence. It should do that , and only create this table if it is absent.
* In my case it should not generate AUTO_PK_SUPPORT to begin with, as all the entities in
the DataMap have auto-incremented PK.

INFO  [2016-11-29 15:44:08,645] main o.a.c.l.CommonsJdbcEventLogger: *** error.
org.apache.derby.iapi.error.StandardException: Table/View 'AUTO_PK_SUPPORT' already exists
in Schema 'APP'.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source)
	at org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown
	at Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)

This message was sent by Atlassian JIRA

View raw message