diff --git a/glassfish-runner/jpa-tck/sql/derby/derby.ddl.persistence.sql b/glassfish-runner/jpa-tck/sql/derby/derby.ddl.persistence.sql index 1d3b460ec5..2f8cbe5491 100644 --- a/glassfish-runner/jpa-tck/sql/derby/derby.ddl.persistence.sql +++ b/glassfish-runner/jpa-tck/sql/derby/derby.ddl.persistence.sql @@ -687,7 +687,7 @@ DROP TABLE RETAILORDER_CONSUMER; CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL); DROP TABLE THEATRELOCATION1; -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL); +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT); DROP TABLE THEATRECOMPANY1; CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)); diff --git a/jpa/bin/pom.xml b/jpa/bin/pom.xml index 0498ac26bf..95f32f1d13 100644 --- a/jpa/bin/pom.xml +++ b/jpa/bin/pom.xml @@ -56,6 +56,7 @@ cts1 cts1 + true true ; @@ -238,48 +239,6 @@ - - exec-maven-plugin - org.codehaus.mojo - - - stop-database-init - pre-integration-test - - exec - - - ${exec.asadmin} - - stop-database - - - 0 - 1 - - - - - - - exec-maven-plugin - org.codehaus.mojo - - - start-database - pre-integration-test - - exec - - - ${exec.asadmin} - - start-database - - - - - org.apache.maven.plugins maven-antrun-plugin @@ -292,7 +251,11 @@ - + + + + + @@ -306,27 +269,16 @@ - + + + + + - - install_java_procedures - pre-integration-test - - run - - - - CALL sqlj.remove_jar('APP.dbprocedures', 0); - CALL sqlj.install_jar('${project.build.directory}/dbprocedures.jar', 'APP.dbprocedures', 0); - CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath', 'APP.dbprocedures'); - - - - @@ -432,29 +384,6 @@ - - org.codehaus.mojo - exec-maven-plugin - - - stop-database-final - post-integration-test - - exec - - - ${exec.asadmin} - - stop-database - - - 0 - 1 - - - - - @@ -479,7 +408,8 @@ glassfish 9.7.0 5.0.0-B01 - eclipselink.logging.level=OFF + org.eclipse.persistence.jpa.PersistenceProvider + eclipselink.logging.level=OFF${jpa.provider.implementation.specific.additional.properties} @@ -598,10 +528,11 @@ hibernate glassfish - 7.0.0-SNAPSHOT + 7.0.0 - hibernate.query.jpaql_strict_compliance=true:hibernate.id.new_generator_mappings=true:hibernate.cache.region.factory_class=org.hibernate.testing.cache.CachingRegionFactory:hibernate.model.generator_name_as_sequence_name=true:hibernate.jpa.compliance.transaction=true:hibernate.jpa.compliance.closed=true:hibernate.jpa.compliance.query=true:hibernate.jpa.compliance.list=true:hibernate.jpa.compliance.caching=true:hibernate.jpa.compliance.global_id_generators=true:hibernate.jpa.compliance=true:hibernate.type.wrapper_array_handling=legacy + hibernate.query.jpaql_strict_compliance=true:hibernate.id.new_generator_mappings=true:hibernate.cache.region.factory_class=org.hibernate.testing.cache.CachingRegionFactory:hibernate.model.generator_name_as_sequence_name=true:hibernate.jpa.compliance.transaction=true:hibernate.jpa.compliance.closed=true:hibernate.jpa.compliance.query=true:hibernate.jpa.compliance.list=true:hibernate.jpa.compliance.caching=true:hibernate.jpa.compliance.global_id_generators=true:hibernate.jpa.compliance=true:hibernate.type.wrapper_array_handling=legacy:hibernate.type.preferred_uuid_jdbc_type=char${jpa.provider.implementation.specific.additional.properties} + org.hibernate.jpa.HibernatePersistenceProvider @@ -699,5 +630,219 @@ + + db2 + + 11.5.9.0 + db2 + com.ibm.db2.jcc.DB2Driver + ! + + + + com.ibm.db2 + jcc + ${db2.jdbc.version} + + + + + derby + + 10.15.2.0 + derby + org.apache.derby.jdbc.ClientDriver + + + + org.apache.derby + derbyclient + ${derby.jdbc.version} + + + org.apache.derby + derbytools + ${derby.jdbc.version} + + + + + + exec-maven-plugin + org.codehaus.mojo + + + stop-database-init + pre-integration-test + + exec + + + ${exec.asadmin} + + stop-database + + + 0 + 1 + + + + + start-database + pre-integration-test + + exec + + + ${exec.asadmin} + + start-database + + + + + stop-database-final + post-integration-test + + exec + + + ${exec.asadmin} + + stop-database + + + 0 + 1 + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + install_java_procedures + pre-integration-test + + run + + + + + + + + CALL sqlj.remove_jar('APP.dbprocedures', 0); + CALL sqlj.install_jar('${project.build.directory}/dbprocedures.jar', 'APP.dbprocedures', 0); + CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath', 'APP.dbprocedures'); + + + + + + + + + + + mssqlserver + + 12.4.2.jre11 + mssqlserver + com.microsoft.sqlserver.jdbc.SQLServerDriver + ! + + + + com.microsoft.sqlserver + mssql-jdbc + ${mssqlserver.jdbc.version} + + + + + mysql + + 8.2.0 + mysql + com.mysql.cj.jdbc.Driver + ! + + + + com.mysql + mysql-connector-j + ${mysql.jdbc.version} + + + + + oracle + + 23.3.0.23.09 + oracle + oracle.jdbc.OracleDriver + ! + + + + com.oracle.database.jdbc + ojdbc11 + ${oracle.jdbc.version} + + + + + postgresql + + 42.6.2 + postgresql + org.postgresql.Driver + + + + org.postgresql + postgresql + ${postgresql.jdbc.version} + + + + + sybase + + 1.0.0 + sybase + com.sybase.jdbc4.jdbc.SybDriver + ! + + + + + com.sybase + jdbc42 + ${sybase.jdbc.version} + + + + + + + windows + + + Windows + + + + ${glassfish.toplevel.dir}/bin/asadmin.bat + + \ No newline at end of file diff --git a/jpa/pom.xml b/jpa/pom.xml index 5b8cc358eb..bcb449fdf5 100644 --- a/jpa/pom.xml +++ b/jpa/pom.xml @@ -96,6 +96,12 @@ shrinkwrap-api 1.2.6 + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-depchain + 3.1.4 + pom + diff --git a/jpa/spec-tests/README.md b/jpa/spec-tests/README.md new file mode 100644 index 0000000000..3124378957 --- /dev/null +++ b/jpa/spec-tests/README.md @@ -0,0 +1,18 @@ +# JPA spec tests + +## Running in IntelliJ + +Create a run configuration for a test and add the following system properties for e.g. PostgreSQL with Hibernate ORM + +* `-Dplatform.mode=standalone` +* `-Dpersistence.unit.name=JPATCK` +* `-Dpersistence.unit.name.2=JPATCK2` +* `-Djakarta.persistence.jdbc.user=hibernate_orm_test` +* `-Djakarta.persistence.jdbc.password=hibernate_orm_test` +* `-Djdbc.db=postgresql` +* `-Ddb.supports.sequence=true` +* `-Djakarta.persistence.provider=org.hibernate.jpa.HibernatePersistenceProvider` +* `-Djakarta.persistence.jdbc.driver=org.postgresql.Driver` +* `-Djakarta.persistence.jdbc.url=jdbc:postgresql://localhost/hibernate_orm_test?preparedStatementCacheQueries=0&escapeSyntaxCallMode=callIfNoReturn` +* `-Djpa.provider.implementation.specific.properties=hibernate.query.jpaql_strict_compliance=true:hibernate.id.new_generator_mappings=true:hibernate.cache.region.factory_class=org.hibernate.testing.cache.CachingRegionFactory:hibernate.model.generator_name_as_sequence_name=true:hibernate.jpa.compliance.transaction=true:hibernate.jpa.compliance.closed=true:hibernate.jpa.compliance.query=true:hibernate.jpa.compliance.list=true:hibernate.jpa.compliance.caching=true:hibernate.jpa.compliance.global_id_generators=true:hibernate.jpa.compliance=true:hibernate.type.wrapper_array_handling=legacy:hibernate.type.preferred_uuid_jdbc_type=char:hibernate.show_sql=true` +* `-Dpersistence.second.level.caching.supported=true` \ No newline at end of file diff --git a/jpa/spec-tests/pom.xml b/jpa/spec-tests/pom.xml index 041de1980b..d091607a2d 100644 --- a/jpa/spec-tests/pom.xml +++ b/jpa/spec-tests/pom.xml @@ -89,4 +89,132 @@ + + + hibernate + + 7.0.0 + + + + + org.hibernate.orm + hibernate-platform + ${hibernate.version} + pom + import + + + + + + org.hibernate.orm + hibernate-core + + + org.hibernate.orm + hibernate-testing + + + org.hibernate.models + hibernate-models + + + io.smallrye + jandex + + + org.antlr + antlr4-runtime + + + net.bytebuddy + byte-buddy + + + + + db2 + + 11.5.9.0 + + + + com.ibm.db2 + jcc + ${db2.jdbc.version} + + + + + derby + + 10.15.2.0 + + + + org.apache.derby + derbyclient + ${derby.jdbc.version} + + + org.apache.derby + derbytools + ${derby.jdbc.version} + + + + + mssqlserver + + 12.4.2.jre11 + + + + com.microsoft.sqlserver + mssql-jdbc + ${mssqlserver.jdbc.version} + + + + + mysql + + 8.2.0 + + + + com.mysql + mysql-connector-j + ${mysql.jdbc.version} + + + + + oracle + + 23.3.0.23.09 + + + + com.oracle.database.jdbc + ojdbc11 + ${oracle.jdbc.version} + + + + + postgresql + + 42.6.2 + + + + org.postgresql + postgresql + ${postgresql.jdbc.version} + + + + diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/nativequery/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/nativequery/Client.java index b31919d932..9bd1a40140 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/nativequery/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/nativequery/Client.java @@ -105,9 +105,9 @@ public void nativeQueryTest2() throws Exception { getEntityManager().persist(o9); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select o.\"ID\" AS \"OID\", o.\"TOTALPRICE\" AS \"OPRICE\", " - + "o.\"FK1_FOR_ITEM\" AS \"OITEM\", i.\"ITEMNAME\" AS \"INAME\" from \"ORDER1\" o, \"ITEM\" i " - + "WHERE (o.\"TOTALPRICE\" < 100) AND (o.\"FK1_FOR_ITEM\" = i.\"ID\")", "Order2ItemResults") + q = getEntityManager().createNativeQuery("Select o.ID AS \"OID\", o.TOTALPRICE AS \"OPRICE\", " + + "o.FK1_FOR_ITEM AS \"OITEM\", i.ITEMNAME AS \"INAME\" from ORDER1 o, ITEM i " + + "WHERE (o.TOTALPRICE < 100) AND (o.FK1_FOR_ITEM = i.ID)", "Order2ItemResults") .getResultList(); if (q.size() != 1) { @@ -217,9 +217,9 @@ public void nativeQueryTest3() throws Exception { logger.log(Logger.Level.TRACE, "Execute Query"); q = getEntityManager() - .createNativeQuery("Select o.\"ID\" AS \"THISID\", o.\"TOTALPRICE\" AS \"THISPRICE\", " - + "o.\"FK1_FOR_ITEM\" AS \"THISITEM\", i.\"ID\", i.\"ITEMNAME\" from \"ORDER1\" o, \"ITEM\" i " - + "WHERE (o.\"TOTALPRICE\" > 140) AND (o.\"FK1_FOR_ITEM\" = i.\"ID\")", "Order3ItemResults") + .createNativeQuery("Select o.ID AS \"THISID\", o.TOTALPRICE AS \"THISPRICE\", " + + "o.FK1_FOR_ITEM AS \"THISITEM\", i.ID, i.ITEMNAME from ORDER1 o, ITEM i " + + "WHERE (o.TOTALPRICE > 140) AND (o.FK1_FOR_ITEM = i.ID)", "Order3ItemResults") .getResultList(); if (q.size() != 1) { @@ -322,9 +322,9 @@ public void nativeQueryColumnResultTypeTest() throws Exception { getEntityManager().persist(o9); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select o.\"ID\" AS \"OID\", o.\"TOTALPRICE\" AS \"OPRICE\", " - + "o.\"FK1_FOR_ITEM\" AS \"OITEM\", i.\"ITEMNAME\" AS \"INAME\" from \"ORDER1\" o, \"ITEM\" i " - + "WHERE (o.\"TOTALPRICE\" < 100) AND (o.\"FK1_FOR_ITEM\" = i.\"ID\")", "Order4ItemResults") + q = getEntityManager().createNativeQuery("Select o.ID AS \"OID\", o.TOTALPRICE AS \"OPRICE\", " + + "o.FK1_FOR_ITEM AS \"OITEM\", i.ITEMNAME AS \"INAME\" from ORDER1 o, ITEM i " + + "WHERE (o.TOTALPRICE < 100) AND (o.FK1_FOR_ITEM = i.ID)", "Order4ItemResults") .getResultList(); if (q.size() != 1) { @@ -430,9 +430,9 @@ public void nativeQueryTestConstructorResult() throws Exception { logger.log(Logger.Level.TRACE, "Execute Query"); q = getEntityManager() .createNativeQuery( - "Select o.\"ID\" AS \"OID\", o.\"TOTALPRICE\" AS \"OPRICE\", " - + "i.\"ITEMNAME\" AS \"OITEMNAME\" from \"ORDER1\" o, \"ITEM\" i " - + "WHERE (o.\"TOTALPRICE\" < 100) AND (o.\"FK1_FOR_ITEM\" = i.\"ID\")", + "Select o.ID AS \"OID\", o.TOTALPRICE AS \"OPRICE\", " + + "i.ITEMNAME AS \"OITEMNAME\" from ORDER1 o, ITEM i " + + "WHERE (o.TOTALPRICE < 100) AND (o.FK1_FOR_ITEM = i.ID)", "Order5ItemResults") .getResultList(); @@ -500,8 +500,8 @@ public void nativeQueryTestConstructorResultWithId() throws Exception { logger.log(Logger.Level.TRACE, "Execute Query"); q = getEntityManager().createNativeQuery( - "Select o.\"ID\" AS \"OID\", o.\"TOTAL\" AS \"PTOTAL\" from \"PURCHASE_ORDER\" o " - + "WHERE (o.\"TOTAL\" < 50)", + "Select o.ID AS \"OID\", o.TOTAL AS \"PTOTAL\" from PURCHASE_ORDER o " + + "WHERE (o.TOTAL < 50)", "PurchaseOrder1Results").getResultList(); if (q.size() != 1) { @@ -568,7 +568,7 @@ public void nativeQueryTestConstructorResultNoId() throws Exception { logger.log(Logger.Level.TRACE, "Execute Query"); q = getEntityManager().createNativeQuery( - "Select o.\"TOTAL\" AS \"PTOTAL\" from \"PURCHASE_ORDER\" o " + "WHERE (o.\"TOTAL\" < 50)", + "Select o.TOTAL AS \"PTOTAL\" from PURCHASE_ORDER o " + "WHERE (o.TOTAL < 50)", "PurchaseOrder2Results").getResultList(); if (q.size() != 1) { @@ -640,7 +640,7 @@ public void createNativeQueryStringTest() throws Exception { getEntityManager().persist(o3); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select o.\"ID\" from \"ORDER1\" o WHERE o.\"ID\" = 2 ") + q = getEntityManager().createNativeQuery("Select o.ID from ORDER1 o WHERE o.ID = 2 ") .getResultList(); List actual = new ArrayList(); @@ -703,7 +703,7 @@ public void createNativeQueryResultClassTest() throws Exception { getEntityManager().persist(o3); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select * from \"ORDER1\" o WHERE o.\"ID\" = 2 ", Order1.class) + q = getEntityManager().createNativeQuery("Select * from ORDER1 o WHERE o.ID = 2 ", Order1.class) .getResultList(); if (q.size() != 1) { @@ -765,7 +765,7 @@ public void createNativeQueryResultClassTQTest() throws Exception { getEntityManager().persist(o3); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select * from \"ORDER1\" o WHERE o.\"ID\" = 2 ", Order1.class) + q = getEntityManager().createNativeQuery("Select * from ORDER1 o WHERE o.ID = 2 ", Order1.class) .getResultList(); if (q.size() != 1) { @@ -804,7 +804,7 @@ public void createNativeQueryResultClassTQTest() throws Exception { public void executeUpdateTransactionRequiredExceptionTest() throws Exception { boolean pass = false; try { - getEntityManager().createNativeQuery("Delete from \"ORDER1\"").executeUpdate(); + getEntityManager().createNativeQuery("Delete from ORDER1").executeUpdate(); logger.log(Logger.Level.ERROR, "TransactionRequiredException was not thrown"); } catch (TransactionRequiredException ise) { logger.log(Logger.Level.TRACE, "Received expected TransactionRequiredException"); @@ -857,7 +857,7 @@ public void setParameterTest() throws Exception { getEntityManager().persist(o3); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select * from \"ORDER1\" o WHERE o.\"ID\" = ? ", Order1.class) + q = getEntityManager().createNativeQuery("Select * from ORDER1 o WHERE o.ID = ? ", Order1.class) .setParameter(1, 2).getResultList(); if (q.size() != 1) { @@ -917,7 +917,7 @@ public void getSingleResultTest() throws Exception { getEntityManager().persist(o3); logger.log(Logger.Level.TRACE, "Execute Query"); - q = getEntityManager().createNativeQuery("Select COUNT(*) from \"ORDER1\" o").getSingleResult(); + q = getEntityManager().createNativeQuery("Select COUNT(*) from ORDER1 o").getSingleResult(); int i = 0; i = convertToInt(q); if (i == 3) { @@ -957,9 +957,9 @@ private void removeTestData() { try { getEntityTransaction().begin(); getEntityManager().createNativeQuery("Delete FROM ORDER2").executeUpdate(); - getEntityManager().createNativeQuery("Delete FROM \"ORDER1\"").executeUpdate(); - getEntityManager().createNativeQuery("Delete FROM \"ITEM\"").executeUpdate(); - getEntityManager().createNativeQuery("Delete FROM \"PURCHASE_ORDER\"").executeUpdate(); + getEntityManager().createNativeQuery("Delete FROM ORDER1").executeUpdate(); + getEntityManager().createNativeQuery("Delete FROM ITEM").executeUpdate(); + getEntityManager().createNativeQuery("Delete FROM PURCHASE_ORDER").executeUpdate(); getEntityTransaction().commit(); } catch (Exception e) { diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client5.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client5.java index b70dd77382..c13dfcc8e1 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client5.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client5.java @@ -2612,7 +2612,8 @@ public void currentDate() throws Exception { Date result = tq.getSingleResult(); Date d = Date.valueOf(result.toString()); - if (d.equals(result)) { + // Use String.equals because java.sql.Date will compare milliseconds and current_date will contain these + if (d.toString().equals(result.toString())) { logger.log(Logger.Level.TRACE, "Successfully returned expected results"); pass = true; } else { diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client9.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client9.java index 1078467a18..f2b8c12a03 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client9.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/CriteriaBuilder/Client9.java @@ -391,8 +391,8 @@ public void testOrPredicateAsListOfN() throws Exception { cQuery.where(cb.or(List.of( cb.equal(root.get("strVal1"), cb.parameter(String.class, "strParam1")), cb.equal(root.get("strVal1"), cb.parameter(String.class, "strParam2")), - cb.equal(root.get("timeVal"), cb.parameter(String.class, "timeParam")), - cb.equal(root.get("dateVal"), cb.parameter(String.class, "dateParam")) + cb.equal(root.get("timeVal"), cb.parameter(LocalTime.class, "timeParam")), + cb.equal(root.get("dateVal"), cb.parameter(LocalDate.class, "dateParam")) ))); TypedQuery query = getEntityManager().createQuery(cQuery); query.setParameter("strParam1", "Left"); @@ -902,7 +902,7 @@ public void testExtractSecondFromTime() throws Exception { cb.parameter(Integer.class, "timeParam"), cb.extract(LocalTimeField.SECOND, root.get("timeVal")))); TypedQuery query = getEntityManager().createQuery(cQuery); - query.setParameter("timeParam", 12); + query.setParameter("timeParam", 12d); List result = query.getResultList(); if (EXPECTED_SIZE == result.size()) { logger.log(System.Logger.Level.TRACE, "Received expected result size:|" + result.size() + "|"); @@ -1177,7 +1177,7 @@ public void testExpressionEqualToExpression() throws Exception { if (cQuery != null) { Root root = cQuery.from(CriteriaEntity.class); cQuery.where( - root.get("strVal1").equalTo(cb.parameter(Integer.class, "strParam"))); + root.get("strVal1").equalTo(cb.parameter(String.class, "strParam"))); TypedQuery query = getEntityManager().createQuery(cQuery); query.setParameter("strParam", "LeftToken"); List result = query.getResultList(); @@ -1266,7 +1266,7 @@ public void testExpressionNotEqualToExpression() throws Exception { if (cQuery != null) { Root root = cQuery.from(CriteriaEntity.class); cQuery.where( - root.get("strVal1").notEqualTo(cb.parameter(Integer.class, "strParam"))); + root.get("strVal1").notEqualTo(cb.parameter(String.class, "strParam"))); TypedQuery query = getEntityManager().createQuery(cQuery); query.setParameter("strParam", "LeftToken"); List result = query.getResultList(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Client.java index 614507a69c..dca8fdda91 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Client.java @@ -992,7 +992,7 @@ private void removeTestData() { } try { getEntityTransaction().begin(); - getEntityManager().createNativeQuery("DELETE FROM \"COFFEE\"").executeUpdate(); + getEntityManager().createNativeQuery("DELETE FROM COFFEE").executeUpdate(); getEntityTransaction().commit(); } catch (Exception e) { logger.log(Logger.Level.ERROR, "Exception encountered while removing entities:", e); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Coffee.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Coffee.java index d532f07ce8..0811f3bdba 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Coffee.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/Coffee.java @@ -29,9 +29,9 @@ import jakarta.persistence.Table; @NamedNativeQueries({ - @NamedNativeQuery(name = "findAllSQLCoffees2", query = "select \"ID\", \"BRANDNAME\", \"PRICE\" from \"COFFEE\"", resultClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class), - @NamedNativeQuery(name = "findAllSQLCoffees", query = "select \"ID\", \"BRANDNAME\", \"PRICE\" from \"COFFEE\"", resultSetMapping = "CoffeeResult"), - @NamedNativeQuery(name = "xmlOverridesNamedNativeQuery", query = "select \"ID\", \"BRANDNAME\", \"PRICE\" from \"COFFEE\"", resultClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class) }) + @NamedNativeQuery(name = "findAllSQLCoffees2", query = "select ID, BRANDNAME, PRICE from COFFEE c", resultClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class), + @NamedNativeQuery(name = "findAllSQLCoffees", query = "select ID, BRANDNAME, PRICE from COFFEE c", resultSetMapping = "CoffeeResult"), + @NamedNativeQuery(name = "xmlOverridesNamedNativeQuery", query = "select ID, BRANDNAME, PRICE from COFFEE c", resultClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class) }) @SqlResultSetMapping(name = "CoffeeResult", entities = @EntityResult(entityClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class)) @NamedQueries({ @NamedQuery(name = "findAllCoffees", query = "Select c from Coffee c", lockMode = LockModeType.PESSIMISTIC_READ), diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/CoffeeMappedSC.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/CoffeeMappedSC.java index 893bb493be..2c304d5219 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/CoffeeMappedSC.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/entitytest/apitests/CoffeeMappedSC.java @@ -24,7 +24,7 @@ import jakarta.persistence.NamedQuery; @NamedNativeQueries({ - @NamedNativeQuery(name = "findDecafSQLCoffees", query = "Select c.\"ID\", c.\"BRANDNAME\", c.\"PRICE\" from \"COFFEE\" c where c.\"BRANDNAME\" like '%decaf%' ", resultClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class) }) + @NamedNativeQuery(name = "findDecafSQLCoffees", query = "Select c.ID, c.BRANDNAME, c.PRICE from COFFEE c where c.BRANDNAME like '%decaf%' ", resultClass = ee.jakarta.tck.persistence.core.entitytest.apitests.Coffee.class) }) @NamedQueries({ @NamedQuery(name = "findDecafCoffees", query = "Select c from Coffee c where c.brandName like '%decaf%'") }) diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/enums/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/enums/Client.java index 50dd2c5e96..c12b7220aa 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/enums/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/enums/Client.java @@ -3132,7 +3132,7 @@ private void removeTestData() { } try { getEntityTransaction().begin(); - getEntityManager().createNativeQuery("DELETE FROM Order").executeUpdate(); + getEntityManager().createNativeQuery("DELETE FROM PURCHASE_ORDER").executeUpdate(); getEntityTransaction().commit(); } catch (Exception e) { logger.log(Logger.Level.ERROR, "Exception encountered while removing entities:", e); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/jpa22/se/generators/sequencegenerators/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/jpa22/se/generators/sequencegenerators/Client.java index 0e5aa7fe17..a8b0d0d215 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/jpa22/se/generators/sequencegenerators/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/jpa22/se/generators/sequencegenerators/Client.java @@ -148,8 +148,14 @@ public void sequenceGeneratorTest() throws Exception { * SEQUENCE SEQGENERATOR START WITH 10 */ - pass2a = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); - pass2b = findDataInFile(f2, "DROP SEQUENCE SEQGENERATOR"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2a = findDataInFile(f2, expected); + expected.clear(); + expected.add("DROP SEQUENCE"); + expected.add("SEQGENERATOR"); + pass2b = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java index 98582996f6..23e9d9a92e 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java @@ -185,22 +185,10 @@ public void joinTableTest() throws Exception { * SCHEMAGENCOURSE (COURSEID) */ - pass2a = findDataInFile(f2, new LinkedList() { - private static final long serialVersionUID = 22L; - { - add("ALTER TABLE"); - add("SCHEMAGEN_COURSE_STUDENT DROP"); - add("STUDENTIDCONSTRAINT"); - } - }); - pass2b = findDataInFile(f2, new LinkedList() { - private static final long serialVersionUID = 22L; - { - add("ALTER TABLE"); - add("SCHEMAGEN_COURSE_STUDENT DROP"); - add("COURSEIDCONSTRAINT"); - } - }); + pass2a = findDataInFile(f2, List.of("ALTER TABLE", "SCHEMAGEN_COURSE_STUDENT DROP", "STUDENTIDCONSTRAINT")); + pass2a = pass2a || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGEN_COURSE_STUDENT", "CASCADE CONSTRAINTS")); + pass2b = findDataInFile(f2, List.of("ALTER TABLE", "SCHEMAGEN_COURSE_STUDENT DROP", "COURSEIDCONSTRAINT")); + pass2b = pass2b || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGEN_COURSE_STUDENT", "CASCADE CONSTRAINTS")); expected.clear(); expected.add("DROP TABLE"); expected.add("SCHEMAGEN_COURSE_STUDENT"); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java index 29d42b9473..259cd7d948 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java @@ -171,6 +171,7 @@ public void orderColumnTest() throws Exception { expected.add("ALTER TABLE"); expected.add("SCHEMAGENEMP DROP"); pass2c = findDataInFile(f2, expected); + pass2c = pass2c || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGENEMP", "CASCADE CONSTRAINTS")); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java index c81e98863d..7eafea44ee 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java @@ -159,6 +159,7 @@ public void secondaryTableTest() throws Exception { expected.add("ALTER TABLE"); expected.add("SCHEMAGENSIMPLE_SECOND DROP"); pass2a = findDataInFile(f2, expected); + pass2a = pass2a || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGENSIMPLE_SECOND", "CASCADE CONSTRAINTS")); expected.clear(); expected.add("DROP TABLE"); expected.add("SCHEMAGENSIMPLE"); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/sequenceGenerator/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/sequenceGenerator/Client.java index 76938de1f2..0f185ccfb8 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/sequenceGenerator/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/sequenceGenerator/Client.java @@ -151,8 +151,14 @@ public void sequenceGeneratorTest() throws Exception { * SEQUENCE SEQGENERATOR START WITH 10 */ - pass2a = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); - pass2b = findDataInFile(f2, "DROP SEQUENCE SEQGENERATOR"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2a = findDataInFile(f2, expected); + expected.clear(); + expected.add("DROP SEQUENCE"); + expected.add("SEQGENERATOR"); + pass2b = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/resources/ee/jakarta/tck/persistence/core/entitytest/apitests/myMappingFile.xml b/jpa/spec-tests/src/main/resources/ee/jakarta/tck/persistence/core/entitytest/apitests/myMappingFile.xml index d6b060df7f..d6219be9e9 100644 --- a/jpa/spec-tests/src/main/resources/ee/jakarta/tck/persistence/core/entitytest/apitests/myMappingFile.xml +++ b/jpa/spec-tests/src/main/resources/ee/jakarta/tck/persistence/core/entitytest/apitests/myMappingFile.xml @@ -29,10 +29,10 @@ Select c from Coffee c where c.brandName='decaf' - select c."ID", c."BRANDNAME", c."PRICE" from "COFFEE" c WHERE c."BRANDNAME" = 'decaf' + select c.ID, c.BRANDNAME, c.PRICE from COFFEE c WHERE c.BRANDNAME = 'decaf' - select c."ID", c."BRANDNAME", c."PRICE" from "COFFEE" c WHERE c."BRANDNAME" = 'decaf' + select c.ID, c.BRANDNAME, c.PRICE from COFFEE c WHERE c.BRANDNAME = 'decaf' diff --git a/sql/db2/db2.ddl.persistence.sql b/sql/db2/db2.ddl.persistence.sql index 436b514fae..7c771b8a58 100644 --- a/sql/db2/db2.ddl.persistence.sql +++ b/sql/db2/db2.ddl.persistence.sql @@ -627,7 +627,7 @@ DROP TABLE RETAILORDER_CONSUMER ! CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID INTEGER NOT NULL,ORDERS_ID INTEGER NOT NULL) ! DROP TABLE THEATRELOCATION1 ! -CREATE TABLE THEATRELOCATION1(ID INTEGER NOT NULL, CODE VARCHAR(255),TCOMP_ID INTEGER NOT NULL) ! +CREATE TABLE THEATRELOCATION1(ID INTEGER NOT NULL, CODE VARCHAR(255),TCOMP_ID INTEGER) ! DROP TABLE THEATRECOMPANY1 ! CREATE TABLE THEATRECOMPANY1(ID INTEGER NOT NULL,NAME VARCHAR(255)) ! @@ -912,4 +912,7 @@ CREATE TABLE UUIDTYPE (ID VARCHAR(96) NOT NULL, NAME VARCHAR(255), PRIMARY KEY ( DROP TABLE CRITERIA_TEST_COLTABLE ! DROP TABLE CRITERIA_TEST_TABLE ! CREATE TABLE CRITERIA_TEST_TABLE (ID INTEGER PRIMARY KEY NOT NULL, DATE_VAL DATE, INT_VAL INTEGER, STR_VAL_1 VARCHAR(255), STR_VAL_2 VARCHAR(255), TIME_VAL TIME) ! -CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)) ! \ No newline at end of file +CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)) ! + +DROP SEQUENCE DATATYPES_SEQ ! +CREATE SEQUENCE DATATYPES_SEQ AS INT START WITH 1 INCREMENT BY 50 ! \ No newline at end of file diff --git a/sql/derby/derby.ddl.persistence.sql b/sql/derby/derby.ddl.persistence.sql index 019080f716..e8aeea0e28 100644 --- a/sql/derby/derby.ddl.persistence.sql +++ b/sql/derby/derby.ddl.persistence.sql @@ -86,7 +86,7 @@ DROP table FKS_ANOOP_CNOOP ; CREATE TABLE FKS_ANOOP_CNOOP( FK8_FOR_CUSTOMER_TABLE VARCHAR(255) , FK2_FOR_ALIAS_TABLE VARCHAR(255)); DROP TABLE CREDITCARD_TABLE; -CREATE TABLE CREDITCARD_TABLE ( ID VARCHAR(255) PRIMARY KEY NOT NULL, TYPE VARCHAR(255) , EXPIRES VARCHAR(255) , APPROVED DECIMAL(18,0) , CREDITCARD_NUMBER VARCHAR(255) , BALANCE DOUBLE, FK3_FOR_CUSTOMER_TABLE VARCHAR(255) , FK_FOR_ORDER_TABLE VARCHAR(255) ); +CREATE TABLE CREDITCARD_TABLE ( ID VARCHAR(255) PRIMARY KEY NOT NULL, TYPE VARCHAR(255) , EXPIRES VARCHAR(255) , APPROVED BOOLEAN , CREDITCARD_NUMBER VARCHAR(255) , BALANCE DOUBLE, FK3_FOR_CUSTOMER_TABLE VARCHAR(255) , FK_FOR_ORDER_TABLE VARCHAR(255) ); DROP TABLE ORDER_TABLE; CREATE TABLE ORDER_TABLE ( ID VARCHAR(255) PRIMARY KEY NOT NULL, TOTALPRICE DOUBLE , FK4_FOR_CUSTOMER_TABLE VARCHAR(255) , FK0_FOR_LINEITEM_TABLE VARCHAR(255) ); @@ -547,7 +547,7 @@ DROP TABLE PKEY; CREATE TABLE PKEY ( PMIDINTEGER INT NOT NULL, PMIDSTRING VARCHAR(25) NOT NULL, PMIDFLOAT REAL NOT NULL, BRANDNAME VARCHAR(25) , PRICE REAL , CONSTRAINT PK_PKEY PRIMARY KEY (PMIDINTEGER, PMIDSTRING, PMIDFLOAT)); DROP TABLE DATATYPES; -CREATE TABLE DATATYPES ( ID INT NOT NULL, BOOLEANDATA SMALLINT, CHARDATA CHAR, SHORTDATA SMALLINT, INTDATA INT, INTDATA2 INT, LONGDATA BIGINT, DBLDATA DOUBLE, FLOATDATA FLOAT, ENUMODATA INT, ENUMSDATA VARCHAR(25), BYTEDATA SMALLINT, TRANS SMALLINT , BYTEARRAYDATA BLOB(6M), CHARARRAYDATA VARCHAR(448), CONSTRAINT PK_DATATYPES PRIMARY KEY (ID)); +CREATE TABLE DATATYPES ( ID INT NOT NULL, BOOLEANDATA BOOLEAN, CHARDATA CHAR, SHORTDATA SMALLINT, INTDATA INT, INTDATA2 INT, LONGDATA BIGINT, DBLDATA DOUBLE, FLOATDATA FLOAT, ENUMODATA INT, ENUMSDATA VARCHAR(25), BYTEDATA SMALLINT, TRANS SMALLINT , BYTEARRAYDATA BLOB(6M), CHARARRAYDATA VARCHAR(448), CONSTRAINT PK_DATATYPES PRIMARY KEY (ID)); DROP TABLE DATATYPES2; CREATE TABLE DATATYPES2 ( DATATYPES2_ID DATE NOT NULL, DATEDATA DATE, TIMEDATA TIME, TSDATA TIMESTAMP, CONSTRAINT PK_DATATYPES2 PRIMARY KEY (DATATYPES2_ID)); @@ -687,7 +687,7 @@ DROP TABLE RETAILORDER_CONSUMER; CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL); DROP TABLE THEATRELOCATION1; -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL); +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT); DROP TABLE THEATRECOMPANY1; CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)); @@ -932,4 +932,7 @@ CREATE TABLE UUIDTYPE (ID VARCHAR(96) NOT NULL, NAME VARCHAR(255), PRIMARY KEY ( DROP TABLE CRITERIA_TEST_COLTABLE; DROP TABLE CRITERIA_TEST_TABLE; CREATE TABLE CRITERIA_TEST_TABLE (ID INTEGER PRIMARY KEY NOT NULL, DATE_VAL DATE, INT_VAL INTEGER, STR_VAL_1 VARCHAR(255), STR_VAL_2 VARCHAR(255), TIME_VAL TIME); -CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)); \ No newline at end of file +CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)); + +DROP SEQUENCE DATATYPES_SEQ RESTRICT; +CREATE SEQUENCE DATATYPES_SEQ START WITH 1 INCREMENT by 50; \ No newline at end of file diff --git a/sql/mssqlserver/mssqlserver.ddl.persistence.sql b/sql/mssqlserver/mssqlserver.ddl.persistence.sql index 967013f606..4a626726b4 100644 --- a/sql/mssqlserver/mssqlserver.ddl.persistence.sql +++ b/sql/mssqlserver/mssqlserver.ddl.persistence.sql @@ -710,7 +710,7 @@ DROP TABLE RETAILORDER_CONSUMER ! CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL) ! DROP TABLE THEATRELOCATION1 ! -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL) ! +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT) ! DROP TABLE THEATRECOMPANY1 ! CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)) ! diff --git a/sql/mysql/mysql.ddl.persistence.sql b/sql/mysql/mysql.ddl.persistence.sql index 0be8b5f162..01838a435e 100644 --- a/sql/mysql/mysql.ddl.persistence.sql +++ b/sql/mysql/mysql.ddl.persistence.sql @@ -232,7 +232,7 @@ ALTER TABLE PERSON_INSURANCE DROP foreign key P_PERSONID ! ALTER TABLE PERSON_INSURANCE DROP foreign key INS_INSID ! -ALTER TABLE "ORDER1" DROP foreign key "FK1_FOR_ITEM" ! +ALTER TABLE ORDER1 DROP foreign key FK1_FOR_ITEM ! ALTER TABLE ORDER2 DROP foreign key FK2_FOR_ITEM ! @@ -742,8 +742,8 @@ ALTER TABLE PERSON_INSURANCE ADD ( CONSTRAINT P_PERSONID FOREIGN KEY (PERSON_PER ALTER TABLE PERSON_INSURANCE ADD ( CONSTRAINT INS_INSID FOREIGN KEY (INSURANCE_INSID) references INSURANCE(INSID) ) ! -DROP TABLE "ORDER1" ! -CREATE TABLE "ORDER1" ("ID" INTEGER PRIMARY KEY NOT NULL, "TOTALPRICE" DOUBLE PRECISION , "FK1_FOR_ITEM" INTEGER) ENGINE=innoDB DEFAULT CHARSET=latin1! +DROP TABLE ORDER1 ! +CREATE TABLE ORDER1 (ID INTEGER PRIMARY KEY NOT NULL, TOTALPRICE DOUBLE PRECISION , FK1_FOR_ITEM INTEGER) ENGINE=innoDB DEFAULT CHARSET=latin1! DROP TABLE ORDER2 ! CREATE TABLE ORDER2 (ID INTEGER PRIMARY KEY NOT NULL, totalPrice DOUBLE PRECISION , FK2_FOR_ITEM INTEGER) ENGINE=innoDB DEFAULT CHARSET=latin1! @@ -751,12 +751,12 @@ CREATE TABLE ORDER2 (ID INTEGER PRIMARY KEY NOT NULL, totalPrice DOUBLE PRECISIO DROP TABLE ORDER3 ! CREATE TABLE ORDER3 (ID INTEGER PRIMARY KEY NOT NULL, totalPrice DOUBLE PRECISION , FK3_FOR_ITEM INTEGER) ENGINE=innoDB DEFAULT CHARSET=latin1 ! -DROP TABLE "ITEM" ! -CREATE TABLE "ITEM" ("ID" INTEGER PRIMARY KEY NOT NULL, "ITEMNAME" VARCHAR(255)) ENGINE=innoDB DEFAULT CHARSET=latin1! +DROP TABLE ITEM ! +CREATE TABLE ITEM (ID INTEGER PRIMARY KEY NOT NULL, ITEMNAME VARCHAR(255)) ENGINE=innoDB DEFAULT CHARSET=latin1! -ALTER TABLE "ORDER1" add ( constraint FK1_FOR_ITEM Foreign Key ("FK1_FOR_ITEM") references "ITEM"("ID") ) ! -ALTER TABLE ORDER2 add ( constraint FK2_FOR_ITEM Foreign Key (FK2_FOR_ITEM) references "ITEM"("ID") ) ! -ALTER TABLE ORDER3 add ( constraint FK3_FOR_ITEM Foreign Key (FK3_FOR_ITEM) references "ITEM"("ID") ) ! +ALTER TABLE ORDER1 add ( constraint FK1_FOR_ITEM Foreign Key (FK1_FOR_ITEM) references ITEM(ID) ) ! +ALTER TABLE ORDER2 add ( constraint FK2_FOR_ITEM Foreign Key (FK2_FOR_ITEM) references ITEM(ID) ) ! +ALTER TABLE ORDER3 add ( constraint FK3_FOR_ITEM Foreign Key (FK3_FOR_ITEM) references ITEM(ID) ) ! DROP TABLE MEMBER ! CREATE TABLE MEMBER (MEMBER_ID INTEGER NOT NULL, MEMBER_NAME VARCHAR(255), DUES SMALLINT, VERSION INTEGER, DONATION NUMERIC, CONSTRAINT PK_MEMBER PRIMARY KEY (MEMBER_ID)) ENGINE=innoDB DEFAULT CHARSET=latin1 ! @@ -765,7 +765,7 @@ DROP TABLE ACCOUNT ! CREATE TABLE ACCOUNT (ID INTEGER NOT NULL, BALANCE DOUBLE PRECISION, DEPOSIT DOUBLE PRECISION, WITHDRAW DOUBLE PRECISION, CONSTRAINT PK_ACCOUNT PRIMARY KEY (ID)) ENGINE=innoDB DEFAULT CHARSET=latin1 ! DROP TABLE PARTTIMEEMPLOYEE ! -CREATE TABLE PARTTIMEEMPLOYEE (ID INT NOT NULL, FIRSTNAME VARCHAR(255) , LASTNAME VARCHAR(255), HIREDATE DATE, SALARY REAL NOT NULL, ADDRESS_ID VARCHAR(255), STATUS VARCHAR(255), FK_DEPT2 NUMERIC , FK_PROJECT INT, CONSTRAINT PK_PARTTIMEEMPLOYEE PRIMARY KEY (ID)) ! +CREATE TABLE PARTTIMEEMPLOYEE (ID INT NOT NULL, FIRSTNAME VARCHAR(255) , LASTNAME VARCHAR(255), HIREDATE DATE, SALARY REAL NOT NULL, ADDRESS_ID VARCHAR(255), STATUS VARCHAR(255), FK_DEPT2 NUMERIC , FK_PROJECT INT, CONSTRAINT PK_PARTTIMEEMPLOYEE PRIMARY KEY (ID)) ENGINE=innoDB DEFAULT CHARSET=latin1 ! ALTER TABLE PARTTIMEEMPLOYEE ADD ( CONSTRAINT FK_ADDR FOREIGN KEY (ADDRESS_ID) REFERENCES ADDRESS(ID) )! ALTER TABLE PARTTIMEEMPLOYEE ADD CONSTRAINT FK_DEPT2 FOREIGN KEY (FK_DEPT2) REFERENCES DEPARTMENT (ID) ! @@ -897,7 +897,7 @@ DROP TABLE RETAILORDER_CONSUMER ! CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL) ! DROP TABLE THEATRELOCATION1 ! -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL) ! +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT) ! DROP TABLE THEATRECOMPANY1 ! CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)) ! diff --git a/sql/oracle/oracle.ddl.persistence.sql b/sql/oracle/oracle.ddl.persistence.sql index bb38550c6e..8a53c69740 100644 --- a/sql/oracle/oracle.ddl.persistence.sql +++ b/sql/oracle/oracle.ddl.persistence.sql @@ -648,7 +648,7 @@ DROP TABLE RETAILORDER_CONSUMER CASCADE CONSTRAINTS! CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID NUMBER NOT NULL,ORDERS_ID NUMBER NOT NULL) ! DROP TABLE THEATRELOCATION1 CASCADE CONSTRAINTS! -CREATE TABLE THEATRELOCATION1(ID NUMBER NOT NULL, CODE VARCHAR(255),TCOMP_ID NUMBER NOT NULL) ! +CREATE TABLE THEATRELOCATION1(ID NUMBER NOT NULL, CODE VARCHAR(255),TCOMP_ID NUMBER) ! DROP TABLE THEATRECOMPANY1 CASCADE CONSTRAINTS! CREATE TABLE THEATRECOMPANY1(ID NUMBER NOT NULL,NAME VARCHAR(255)) ! @@ -909,4 +909,7 @@ CREATE TABLE UUIDTYPE (ID VARCHAR(96) NOT NULL, NAME VARCHAR(255), PRIMARY KEY ( DROP TABLE CRITERIA_TEST_COLTABLE ! DROP TABLE CRITERIA_TEST_TABLE ! CREATE TABLE CRITERIA_TEST_TABLE (ID INTEGER PRIMARY KEY NOT NULL, DATE_VAL DATE, INT_VAL INTEGER, STR_VAL_1 VARCHAR(255), STR_VAL_2 VARCHAR(255), TIME_VAL DATE) ! -CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)) ! \ No newline at end of file +CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)) ! + +DROP SEQUENCE DATATYPES_SEQ ! +CREATE SEQUENCE DATATYPES_SEQ START WITH 1 INCREMENT BY 50 ! \ No newline at end of file diff --git a/sql/pointbase/pointbase.ddl.persistence.sql b/sql/pointbase/pointbase.ddl.persistence.sql index fc93241e17..f7c910796b 100644 --- a/sql/pointbase/pointbase.ddl.persistence.sql +++ b/sql/pointbase/pointbase.ddl.persistence.sql @@ -591,7 +591,7 @@ DROP TABLE RETAILORDER_CONSUMER cascade ; CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL) ; DROP TABLE THEATRELOCATION1 cascade ; -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL) ; +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT) ; DROP TABLE THEATRECOMPANY1 cascade ; CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)) ; diff --git a/sql/postgresql/postgresql.ddl.persistence.sprocs.sql b/sql/postgresql/postgresql.ddl.persistence.sprocs.sql index 16039e162c..f1b0ae403d 100644 --- a/sql/postgresql/postgresql.ddl.persistence.sprocs.sql +++ b/sql/postgresql/postgresql.ddl.persistence.sprocs.sql @@ -1,29 +1,29 @@ drop table Integer_Tab ; create table Integer_Tab (MAX_VAL INTEGER, MIN_VAL INTEGER, NULL_VAL INTEGER NULL) ; -DROP FUNCTION Integer_Proc(out pmax integer,out pmen integer,out pnull integer); -CREATE OR REPLACE FUNCTION Integer_Proc(out pmax integer,out pmin integer,out pnull integer) returns record as ' begin select * into pmax, pmin, pnull from Integer_Tab; end;' language 'plpgsql'; +DROP PROCEDURE Integer_Proc(out pmax integer,out pmen integer,out pnull integer); +CREATE OR REPLACE PROCEDURE Integer_Proc(out pmax integer,out pmin integer,out pnull integer) language 'plpgsql' as ' begin select * into pmax, pmin, pnull from Integer_Tab; end ;'; -DROP FUNCTION GetEmpOneFirstNameFromOut(out OUT_PARAM text) ; -CREATE OR REPLACE FUNCTION GetEmpOneFirstNameFromOut (out OUT_PARAM text) returns text as ' begin SELECT FIRSTNAME into OUT_PARAM FROM EMPLOYEE WHERE ID=1; END;' language 'plpgsql'; +DROP PROCEDURE GetEmpOneFirstNameFromOut(out OUT_PARAM text) ; +CREATE OR REPLACE PROCEDURE GetEmpOneFirstNameFromOut (out OUT_PARAM text) language 'plpgsql' as ' begin SELECT FIRSTNAME into OUT_PARAM FROM EMPLOYEE WHERE ID=1; END;'; -DROP FUNCTION GetEmpFirstNameFromOut(in IN_PARAM int, out OUT_PARAM text) ; -CREATE OR REPLACE FUNCTION GetEmpFirstNameFromOut (in IN_PARAM int, out OUT_PARAM text) returns text as ' begin SELECT FIRSTNAME into OUT_PARAM FROM EMPLOYEE WHERE ID=IN_PARAM; END ;' language 'plpgsql'; +DROP PROCEDURE GetEmpFirstNameFromOut(in IN_PARAM int, out OUT_PARAM text) ; +CREATE OR REPLACE PROCEDURE GetEmpFirstNameFromOut (in IN_PARAM int, out OUT_PARAM text) language 'plpgsql' as ' begin SELECT FIRSTNAME into OUT_PARAM FROM EMPLOYEE WHERE ID=IN_PARAM; END ;'; -DROP FUNCTION GetEmpLastNameFromInOut(inout INOUT_PARAM text) ; -CREATE OR REPLACE FUNCTION GetEmpLastNameFromInOut (inout INOUT_PARAM text) returns text as ' begin SELECT LASTNAME into INOUT_PARAM FROM EMPLOYEE WHERE ID=CAST(INOUT_PARAM AS int); END ;' language 'plpgsql'; +DROP PROCEDURE GetEmpLastNameFromInOut(inout INOUT_PARAM text) ; +CREATE OR REPLACE PROCEDURE GetEmpLastNameFromInOut (inout INOUT_PARAM text) language 'plpgsql' as ' begin SELECT LASTNAME into INOUT_PARAM FROM EMPLOYEE WHERE ID=CAST(INOUT_PARAM AS int); END ;'; -DROP FUNCTION GetEmpASCFromRS() ; -CREATE OR REPLACE FUNCTION GetEmpASCFromRS() RETURNS refcursor AS ' DECLARE ref refcursor; BEGIN OPEN ref FOR SELECT ID, FIRSTNAME, LASTNAME, HIREDATE, SALARY from EMPLOYEE ORDER BY ID ASC; RETURN ref; END; ' LANGUAGE plpgsql; +DROP PROCEDURE GetEmpASCFromRS() ; +CREATE OR REPLACE PROCEDURE GetEmpASCFromRS(out ref refcursor) LANGUAGE plpgsql AS ' BEGIN OPEN ref FOR SELECT ID, FIRSTNAME, LASTNAME, HIREDATE, SALARY from EMPLOYEE ORDER BY ID ASC; END; '; -DROP FUNCTION GetEmpIdFNameLNameFromRS(in IN_PARAM int) ; -CREATE OR REPLACE FUNCTION GetEmpIdFNameLNameFromRS(in IN_PARAM int) RETURNS refcursor AS ' DECLARE ref refcursor; BEGIN OPEN ref FOR SELECT ID, FIRSTNAME, LASTNAME from EMPLOYEE WHERE ID=IN_PARAM; RETURN ref; END; ' LANGUAGE plpgsql; +DROP PROCEDURE GetEmpIdFNameLNameFromRS(in IN_PARAM int) ; +CREATE OR REPLACE PROCEDURE GetEmpIdFNameLNameFromRS(in IN_PARAM int, out ref refcursor) LANGUAGE plpgsql AS ' BEGIN OPEN ref FOR SELECT ID, FIRSTNAME, LASTNAME from EMPLOYEE WHERE ID=IN_PARAM; END; '; -DROP FUNCTION GetEmpIdUsingHireDateFromOut(in IN_PARAM DATE, out OUT_PARAM int) ; -CREATE OR REPLACE FUNCTION GetEmpIdUsingHireDateFromOut (in IN_PARAM DATE, out OUT_PARAM int) returns int as ' begin SELECT ID into OUT_PARAM FROM EMPLOYEE WHERE HIREDATE=IN_PARAM; END ;' language 'plpgsql'; +DROP PROCEDURE GetEmpIdUsingHireDateFromOut(in IN_PARAM DATE, out OUT_PARAM int) ; +CREATE OR REPLACE PROCEDURE GetEmpIdUsingHireDateFromOut (in IN_PARAM DATE, out OUT_PARAM int) language 'plpgsql' as ' begin SELECT ID into OUT_PARAM FROM EMPLOYEE WHERE HIREDATE=IN_PARAM; END ;'; -DROP FUNCTION UpdateEmpSalaryColumn() ; -CREATE OR REPLACE FUNCTION UpdateEmpSalaryColumn() returns void as ' begin UPDATE EMPLOYEE set SALARY=0.00; END ;' language 'plpgsql'; +DROP PROCEDURE UpdateEmpSalaryColumn() ; +CREATE OR REPLACE PROCEDURE UpdateEmpSalaryColumn() language 'plpgsql' as ' begin UPDATE EMPLOYEE set SALARY=0.00; END ;'; -DROP FUNCTION DeleteAllEmp() ; -CREATE OR REPLACE FUNCTION DeleteAllEmp() returns void as ' begin DELETE FROM EMPLOYEE; END ;' language 'plpgsql'; +DROP PROCEDURE DeleteAllEmp() ; +CREATE OR REPLACE PROCEDURE DeleteAllEmp() language 'plpgsql' as ' begin DELETE FROM EMPLOYEE; END ;'; diff --git a/sql/postgresql/postgresql.ddl.persistence.sql b/sql/postgresql/postgresql.ddl.persistence.sql index d22ad45c27..2c3b3fc67d 100644 --- a/sql/postgresql/postgresql.ddl.persistence.sql +++ b/sql/postgresql/postgresql.ddl.persistence.sql @@ -259,9 +259,6 @@ CREATE TABLE INSURANCE (INSID INTEGER PRIMARY KEY NOT NULL, CARRIER VARCHAR(255) DROP TABLE COFFEE cascade; CREATE TABLE COFFEE (ID INTEGER PRIMARY KEY NOT NULL, BRANDNAME VARCHAR(25), PRICE NUMERIC(126)); -DROP TABLE "COFFEE" cascade; -CREATE TABLE "COFFEE" ("ID" INTEGER PRIMARY KEY NOT NULL, "BRANDNAME" VARCHAR(25), "PRICE" NUMERIC(126)); - DROP TABLE COMPANY cascade ; CREATE TABLE COMPANY (COMPANYID INTEGER PRIMARY KEY NOT NULL, NAME VARCHAR(25), ADDRESS_ID VARCHAR(255) ); @@ -312,7 +309,7 @@ DROP TABLE PKEY cascade; CREATE TABLE PKEY ( PMIDINTEGER INTEGER , PMIDSTRING VARCHAR(25) , PMIDFLOAT NUMERIC(126) , BRANDNAME VARCHAR(25) , PRICE NUMERIC(126), constraint PKEY_PK PRIMARY KEY(PMIDINTEGER,PMIDSTRING,PMIDFLOAT) ); DROP TABLE DATATYPES cascade; -CREATE TABLE DATATYPES (ID INTEGER NOT NULL, BOOLEANDATA BOOLEAN, CHARDATA CHAR, SHORTDATA SMALLINT, INTDATA INTEGER, INTDATA2 INTEGER, LONGDATA BIGINT, DBLDATA DOUBLE PRECISION, FLOATDATA REAL, ENUMODATA INTEGER, ENUMSDATA VARCHAR(25), BYTEDATA SMALLINT, TRANS SMALLINT, BYTEARRAYDATA BYTEA, CHARARRAYDATA VARCHAR(448), CONSTRAINT DT_PK PRIMARY KEY(ID)); +CREATE TABLE DATATYPES (ID INTEGER NOT NULL, BOOLEANDATA BOOLEAN, CHARDATA CHAR, SHORTDATA SMALLINT, INTDATA INTEGER, INTDATA2 INTEGER, LONGDATA BIGINT, DBLDATA DOUBLE PRECISION, FLOATDATA REAL, ENUMODATA INTEGER, ENUMSDATA VARCHAR(25), BYTEDATA SMALLINT, TRANS SMALLINT, BYTEARRAYDATA OID, CHARARRAYDATA VARCHAR(448), CONSTRAINT DT_PK PRIMARY KEY(ID)); DROP TABLE DATATYPES2 cascade; CREATE TABLE DATATYPES2 ( DATATYPES2_ID DATE , DATEDATA DATE, TIMEDATA TIME, TSDATA TIMESTAMP, CONSTRAINT DT2_PK PRIMARY KEY(DATATYPES2_ID) ); @@ -331,11 +328,11 @@ DROP TABLE SEQUENCE cascade; CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(10), SEQ_COUNT INTEGER, CONSTRAINT SEQUENCE_PK PRIMARY KEY (SEQ_NAME) ); INSERT into SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0) ; -DROP TABLE "PURCHASE_ORDER" cascade; -CREATE TABLE "PURCHASE_ORDER" (ID INTEGER PRIMARY KEY NOT NULL, TOTAL INTEGER, DESCRIPTION VARCHAR(50)); +DROP TABLE PURCHASE_ORDER cascade; +CREATE TABLE PURCHASE_ORDER (ID INTEGER PRIMARY KEY NOT NULL, TOTAL INTEGER, DESCRIPTION VARCHAR(50)); -DROP TABLE "ORDER1" cascade; -CREATE TABLE "ORDER1" ("ID" INTEGER PRIMARY KEY NOT NULL, "TOTALPRICE" DOUBLE PRECISION , "FK1_FOR_ITEM" INTEGER); +DROP TABLE ORDER1 cascade; +CREATE TABLE ORDER1 (ID INTEGER PRIMARY KEY NOT NULL, TOTALPRICE DOUBLE PRECISION , FK1_FOR_ITEM INTEGER); DROP TABLE ORDER2 cascade; CREATE TABLE ORDER2 (ID INTEGER PRIMARY KEY NOT NULL, TOTALPRICE DOUBLE PRECISION , FK2_FOR_ITEM INTEGER); @@ -343,13 +340,13 @@ CREATE TABLE ORDER2 (ID INTEGER PRIMARY KEY NOT NULL, TOTALPRICE DOUBLE PRECISIO DROP TABLE ORDER3 cascade; CREATE TABLE ORDER3 (ID INTEGER PRIMARY KEY NOT NULL, TOTALPRICE DOUBLE PRECISION , FK3_FOR_ITEM INTEGER); -DROP TABLE "ITEM" cascade; -CREATE TABLE "ITEM" ("ID" INTEGER PRIMARY KEY NOT NULL, "ITEMNAME" VARCHAR(255)) ; +DROP TABLE ITEM cascade; +CREATE TABLE ITEM (ID INTEGER PRIMARY KEY NOT NULL, ITEMNAME VARCHAR(255)) ; -ALTER TABLE "ORDER1" add constraint FK1_FOR_ITEM Foreign Key ("FK1_FOR_ITEM") references "ITEM"("ID") ; -ALTER TABLE ORDER2 add constraint FK2_FOR_ITEM Foreign Key (FK2_FOR_ITEM) references "ITEM"("ID") ; -ALTER TABLE ORDER3 add constraint FK3_FOR_ITEM Foreign Key (FK3_FOR_ITEM) references "ITEM"("ID") ; +ALTER TABLE ORDER1 add constraint FK1_FOR_ITEM Foreign Key (FK1_FOR_ITEM) references ITEM(ID) ; +ALTER TABLE ORDER2 add constraint FK2_FOR_ITEM Foreign Key (FK2_FOR_ITEM) references ITEM(ID) ; +ALTER TABLE ORDER3 add constraint FK3_FOR_ITEM Foreign Key (FK3_FOR_ITEM) references ITEM(ID) ; DROP TABLE MEMBER cascade ; CREATE TABLE MEMBER (MEMBER_ID INTEGER , MEMBER_NAME VARCHAR(255), DUES BOOLEAN, VERSION INTEGER, DONATION BIGINT, CONSTRAINT MEMBER_PK PRIMARY KEY(MEMBER_ID)) ; @@ -483,7 +480,7 @@ DROP TABLE RETAILORDER_CONSUMER cascade ; CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL) ; DROP TABLE THEATRELOCATION1 cascade ; -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL) ; +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT) ; DROP TABLE THEATRECOMPANY1 cascade ; CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)) ; @@ -746,4 +743,7 @@ CREATE TABLE UUIDTYPE (ID VARCHAR(96) NOT NULL, NAME VARCHAR(255), PRIMARY KEY ( DROP TABLE CRITERIA_TEST_COLTABLE; DROP TABLE CRITERIA_TEST_TABLE; CREATE TABLE CRITERIA_TEST_TABLE (ID INTEGER PRIMARY KEY NOT NULL, DATE_VAL DATE, INT_VAL INTEGER, STR_VAL_1 VARCHAR(255), STR_VAL_2 VARCHAR(255), TIME_VAL TIME); -CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)); \ No newline at end of file +CREATE TABLE CRITERIA_TEST_COLTABLE(ENT_ID INTEGER NOT NULL, COLVAL VARCHAR(255), CONSTRAINT FK_CRITERIA_TEST_COLTABLE_ENT_ID FOREIGN KEY (ENT_ID) REFERENCES CRITERIA_TEST_TABLE (ID)); + +DROP SEQUENCE DATATYPES_SEQ; +CREATE SEQUENCE DATATYPES_SEQ START WITH 1 INCREMENT BY 50 ; \ No newline at end of file diff --git a/sql/sybase/sybase.ddl.persistence.sql b/sql/sybase/sybase.ddl.persistence.sql index 0e43dc8b6b..df79b34b9e 100644 --- a/sql/sybase/sybase.ddl.persistence.sql +++ b/sql/sybase/sybase.ddl.persistence.sql @@ -880,7 +880,7 @@ DROP TABLE RETAILORDER_CONSUMER ! CREATE TABLE RETAILORDER_CONSUMER(CONSUMERS_ID BIGINT NOT NULL,ORDERS_ID BIGINT NOT NULL) ! DROP TABLE THEATRELOCATION1 ! -CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT NOT NULL) ! +CREATE TABLE THEATRELOCATION1(ID BIGINT NOT NULL, CODE VARCHAR(255),TCOMP_ID BIGINT) ! DROP TABLE THEATRECOMPANY1 ! CREATE TABLE THEATRECOMPANY1(ID BIGINT NOT NULL,NAME VARCHAR(255)) ! diff --git a/user_guides/platform/src/main/jbake/content/rules-wp.adoc b/user_guides/platform/src/main/jbake/content/rules-wp.adoc index 92df71a10f..52e47f3d8a 100644 --- a/user_guides/platform/src/main/jbake/content/rules-wp.adoc +++ b/user_guides/platform/src/main/jbake/content/rules-wp.adoc @@ -62,7 +62,7 @@ and are not intended for any other purpose. [[sthref11]][[sthref12]] -Table 3-1 Definitions  +Table 3-1 Definitions [width="100%",cols="25%,75%",options="header",] |======================================================================= diff --git a/user_guides/platform/src/main/jbake/content/rules.adoc b/user_guides/platform/src/main/jbake/content/rules.adoc index 0842d3dd10..0a6443955a 100644 --- a/user_guides/platform/src/main/jbake/content/rules.adoc +++ b/user_guides/platform/src/main/jbake/content/rules.adoc @@ -65,7 +65,7 @@ and are not intended for any other purpose. [[sthref7]][[sthref8]] -===== Table 2-1 Definitions  +===== Table 2-1 Definitions [width="100%",cols="25%,75%",options="header",] |=======================================================================