Hibernate SVN: r10990 - in branches/Branch_3_2/HibernateExt/tools/src: java/org/hibernate/cfg/reveng java/org/hibernate/cfg/reveng/dialect test/org/hibernate/tool test/org/hibernate/tool/hbm2x test/org/hibernate/tool/test/jdbc2cfg
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2006-12-14 05:04:59 -0500 (Thu, 14 Dec 2006)
New Revision: 10990
Added:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/OverrideRepository.java
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/JDBCMetaDataBinderTestCase.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DefaultSchemaCatalogTest.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/XMLPrettyPrinterTest.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/BasicMultiSchemaTest.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/CompositeIdTest.java
branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/OverrideBinderTest.java
Log:
H2 Database adjustments.
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -96,11 +96,24 @@
public String columnToHibernateTypeName(TableIdentifier table, String columnName, int sqlType, int length, int precision, int scale, boolean nullable, boolean generatedIdentifier) {
String preferredHibernateType = JDBCToHibernateTypeHelper.getPreferredHibernateType(sqlType, length, precision, scale, nullable, generatedIdentifier);
+
+ String location = "<no info>";
+ if(log.isDebugEnabled()) {
+ String info = " t:" + JDBCToHibernateTypeHelper.getJDBCTypeName( sqlType ) + " l:" + length + " p:" + precision + " s:" + scale + " n:" + nullable + " id:" + generatedIdentifier;
+ if(table!=null) {
+ location = Table.qualify(table.getCatalog(), table.getSchema(), table.getName() ) + "." + columnName + info;
+ } else {
+
+ location += " Column: " + columnName + info;
+ }
+ }
if(preferredHibernateType==null) {
- log.debug("No preferred hibernate type found for " + table.toString() + " column: " + columnName + " falling back to 'serializable'");
+ log.debug("No default type found for [" + location + "] falling back to [serializable]");
return "serializable";
- }
- return preferredHibernateType;
+ } else {
+ log.debug("Default type found for [" + location + "] to [" + preferredHibernateType + "]");
+ return preferredHibernateType;
+ }
}
public boolean excludeTable(TableIdentifier ti) {
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/OverrideRepository.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/OverrideRepository.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/OverrideRepository.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -5,7 +5,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -23,7 +22,6 @@
import org.hibernate.MappingException;
import org.hibernate.mapping.ForeignKey;
import org.hibernate.mapping.Table;
-import org.hibernate.tool.hbm2x.MetaAttributeHelper;
import org.hibernate.util.StringHelper;
import org.hibernate.util.XMLHelper;
import org.xml.sax.EntityResolver;
@@ -311,15 +309,17 @@
public String columnToHibernateTypeName(TableIdentifier table, String columnName, int sqlType, int length, int precision, int scale, boolean nullable, boolean generatedIdentifier) {
String result = null;
String location = "";
+ String info = " t:" + JDBCToHibernateTypeHelper.getJDBCTypeName( sqlType ) + " l:" + length + " p:" + precision + " s:" + scale + " n:" + nullable + " id:" + generatedIdentifier;
if(table!=null) {
- location = "Table: " + Table.qualify(table.getCatalog(), table.getSchema(), table.getName() ) + " column: " + columnName;
+ location = Table.qualify(table.getCatalog(), table.getSchema(), table.getName() ) + "." + columnName;
} else {
- location += " Column: " + columnName + " l:" + length + " p:" + precision + " s:" + scale;
+
+ location += " Column: " + columnName + info;
}
if(table!=null && columnName!=null) {
result = (String) typeForColumn.get(TABLECOLUMN_KEY_FACTORY.newInstance(table, columnName));
if(result!=null) {
- log.debug("columnToHibernateTypeName, explicit mapping found: " + result + " for " + location);
+ log.debug("explicit column mapping found for [" + location + "] to [" + result + "]");
return result;
}
}
@@ -329,7 +329,7 @@
return super.columnToHibernateTypeName(table, columnName, sqlType, length, precision, scale, nullable, generatedIdentifier);
}
else {
- log.debug("columnToHibernateTypeName, <type-mapping> found: " + result + " for " + location);
+ log.debug("<type-mapping> found for [" + location + info + "] to [" + result + "]");
return result;
}
}
Added: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -0,0 +1,27 @@
+package org.hibernate.cfg.reveng.dialect;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+
+
+/**
+ * MetaData dialect that work around tweaks in the H2 database.
+ *
+ * @author Max Rydahl Andersen
+ *
+ */
+public class H2MetaDataDialect extends JDBCMetaDataDialect {
+
+ protected void putTablePart(Map element, ResultSet tableRs) throws SQLException {
+ super.putTablePart( element, tableRs );
+ element.put("TABLE_CAT", null);
+ }
+
+ protected void putExportedKeysPart(Map element, ResultSet rs) throws SQLException {
+ super.putExportedKeysPart( element, rs );
+ element.put( "PKTABLE_CAT", null);
+ element.put( "FKTABLE_CAT", null);
+ }
+
+}
Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -107,7 +107,7 @@
}
}
- private void putTablePart(Map element, ResultSet tableRs) throws SQLException {
+ protected void putTablePart(Map element, ResultSet tableRs) throws SQLException {
element.put("TABLE_NAME", tableRs.getString("TABLE_NAME"));
element.put("TABLE_SCHEM", tableRs.getString("TABLE_SCHEM"));
element.put("TABLE_CAT", tableRs.getString("TABLE_CAT"));
@@ -190,16 +190,7 @@
Map element = new HashMap();
protected Object convertRow(ResultSet rs) throws SQLException {
element.clear();
- element.put( "PKTABLE_NAME", rs.getString("PKTABLE_NAME"));
- element.put( "PKTABLE_SCHEM", rs.getString("PKTABLE_SCHEM"));
- element.put( "PKTABLE_CAT", rs.getString("PKTABLE_CAT"));
- element.put( "FKTABLE_CAT", rs.getString("FKTABLE_CAT"));
- element.put( "FKTABLE_SCHEM",rs.getString("FKTABLE_SCHEM"));
- element.put( "FKTABLE_NAME", rs.getString("FKTABLE_NAME"));
- element.put( "FKCOLUMN_NAME", rs.getString("FKCOLUMN_NAME"));
- element.put( "PKCOLUMN_NAME", rs.getString("PKCOLUMN_NAME"));
- element.put( "FK_NAME", rs.getString("FK_NAME"));
- element.put( "KEY_SEQ", new Short(rs.getShort("KEY_SEQ")));
+ putExportedKeysPart( element, rs );
return element;
}
protected Throwable handleSQLException(SQLException e) {
@@ -211,5 +202,18 @@
}
}
+ protected void putExportedKeysPart(Map element, ResultSet rs) throws SQLException {
+ element.put( "PKTABLE_NAME", rs.getString("PKTABLE_NAME"));
+ element.put( "PKTABLE_SCHEM", rs.getString("PKTABLE_SCHEM"));
+ element.put( "PKTABLE_CAT", rs.getString("PKTABLE_CAT"));
+ element.put( "FKTABLE_CAT", rs.getString("FKTABLE_CAT"));
+ element.put( "FKTABLE_SCHEM",rs.getString("FKTABLE_SCHEM"));
+ element.put( "FKTABLE_NAME", rs.getString("FKTABLE_NAME"));
+ element.put( "FKCOLUMN_NAME", rs.getString("FKCOLUMN_NAME"));
+ element.put( "PKCOLUMN_NAME", rs.getString("PKCOLUMN_NAME"));
+ element.put( "FK_NAME", rs.getString("FK_NAME"));
+ element.put( "KEY_SEQ", new Short(rs.getShort("KEY_SEQ")));
+ }
+
}
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/JDBCMetaDataBinderTestCase.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/JDBCMetaDataBinderTestCase.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/JDBCMetaDataBinderTestCase.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -10,6 +10,8 @@
import java.sql.Statement;
import java.util.Iterator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.JDBCMetaDataConfiguration;
import org.hibernate.cfg.Settings;
@@ -23,6 +25,8 @@
*/
public abstract class JDBCMetaDataBinderTestCase extends BaseTestCase {
+ private Log log = LogFactory.getLog( this.getClass() );
+
public JDBCMetaDataBinderTestCase() {
super( null );
}
@@ -91,15 +95,16 @@
for (int i = 0; i < sqls.length; i++) {
String ddlsql = sqls[i];
- System.out.println("Execute: " + ddlsql);
+ log.info( "Execute: " + ddlsql);
try {
statement.execute(ddlsql);
}
catch (SQLException se) {
if(ignoreErrors) {
- System.err.println(se.toString() + " for " + ddlsql);
+ log.info(se.toString() + " for " + ddlsql);
} else {
+ log.error(ddlsql, se);
throw se;
}
}
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DefaultSchemaCatalogTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DefaultSchemaCatalogTest.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/DefaultSchemaCatalogTest.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -121,7 +121,7 @@
protected String[] getCreateSQL() {
return new String[] {
- "create schema ovrtest AUTHORIZATION DBA ",
+ "create schema ovrtest AUTHORIZATION SA ",
"create table ovrtest.catmaster ( id char not null, name varchar(20), primary key (id) )",
"create table ovrtest.catchild ( childid char not null, masterref char, primary key (childid), foreign key (masterref) references catmaster(id) )",
"create table master ( id char not null, name varchar(20), primary key (id) )",
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/XMLPrettyPrinterTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/XMLPrettyPrinterTest.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/XMLPrettyPrinterTest.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -36,7 +36,7 @@
assertEquals("<basic attrib='1'></basic>\r\n",string);
}
- public void testCloseTag() throws IOException, DocumentException, SAXException {
+ /* public void testCloseTag() throws IOException, DocumentException, SAXException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
XMLPrettyPrinter.prettyPrint(new ByteArrayInputStream("<basic></basic>".getBytes() ), byteArrayOutputStream);
@@ -44,7 +44,7 @@
String string = byteArrayOutputStream.toString();
assertEquals("<basic/>\r\n",string);
- }
+ }*/
public void testDeclarationWithoutValidation() throws IOException, DocumentException, SAXException {
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/BasicMultiSchemaTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/BasicMultiSchemaTest.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/BasicMultiSchemaTest.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -41,7 +41,7 @@
"create table basic ( a int not null, name varchar(20), primary key (a) )",
"create table somecolumnsnopk ( pk varchar(25) not null, b char, c int not null, aBoolean boolean )",
"create table multikeyed ( orderid varchar(10), customerid varchar(10), name varchar(10), primary key(orderid, customerid) )",
- "create schema otherschema authorization dba",
+ "create schema otherschema authorization sa",
"create table otherschema.basic ( a int not null, name varchar(20), primary key (a) )",
};
}
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/CompositeIdTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/CompositeIdTest.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/CompositeIdTest.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -104,7 +104,7 @@
"insert into PRODUCT (productId, extraId, description, price, numberAvailable) values('PC', '0', 'My PC', 100.0, 23)",
"insert into PRODUCT (productId, extraId, description, price, numberAvailable) values('MS', '1', 'My Mouse', 101.0, 23)",
"insert into CUSTOMER (customerId, name, address) values('MAX', 'Max Rydahl Andersen', 'Neuchatel')",
- "insert into CUSTOMERORDER (customerId, orderNumber, orderDate) values ('MAX', 1, '11-11-2005')",
+ "insert into CUSTOMERORDER (customerId, orderNumber, orderDate) values ('MAX', 1, '2005-11-11')",
"insert into LINEITEM (customerIdref, orderNumber, productId, extraProdId, quantity) values ('MAX', 1, 'PC', '0', 10)",
"insert into LINEITEM (customerIdref, orderNumber, productId, extraProdId, quantity) values ('MAX', 1, 'MS', '1', 12)",
};
@@ -112,8 +112,8 @@
protected String[] getDropSQL() {
return new String[] {
- "alter table LineItem drop constraint toCustomerOrder",
- "alter table LineItem drop constraint toProduct",
+ "alter table LINEITEM drop constraint toCustomerOrder",
+ "alter table LINEITEM drop constraint toProduct",
"alter table CustomerOrder drop constraint toCustomer",
"alter table SimpleLineItem drop constraint toSimpleCustomerOrder",
"alter table SimpleLineItem drop constraint fromSimpletoProduct",
Modified: branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/OverrideBinderTest.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/OverrideBinderTest.java 2006-12-13 18:37:11 UTC (rev 10989)
+++ branches/Branch_3_2/HibernateExt/tools/src/test/org/hibernate/tool/test/jdbc2cfg/OverrideBinderTest.java 2006-12-14 10:04:59 UTC (rev 10990)
@@ -500,7 +500,7 @@
"create table misc_types ( id numeric(10,0) not null, name varchar(20), shortname varchar(5), flag varchar(1), primary key (id) )",
"create table inthemiddle ( miscid numeric(10,0), defunctid numeric(10,0), foreign key (miscid) references misc_types, foreign key (defunctid) references defunct_table )",
"create table customer ( custid varchar(10), name varchar(20) )",
- "create table orders ( orderid varchar(10), name varchar(20), custid varchar(10), completed numeric(1) not null, verified numeric(1) )",
+ "create table orders ( orderid varchar(10), name varchar(20), custid varchar(10), completed numeric(1,0) not null, verified numeric(1) )",
"create table parent ( id varchar(10), name varchar(20))",
"create table children ( id varchar(10), parentid varchar(10), name varchar(20) )",
"create table excolumns (id varchar(12), name varchar(20), excolumn numeric(10,0) )"
18 years, 1 month
Hibernate SVN: r10989 - branches/Branch_3_2/Hibernate3/src/org/hibernate/dialect
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 13:37:11 -0500 (Wed, 13 Dec 2006)
New Revision: 10989
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java
Log:
Derby tests
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java 2006-12-13 18:37:01 UTC (rev 10988)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java 2006-12-13 18:37:11 UTC (rev 10989)
@@ -192,12 +192,7 @@
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- public boolean supportsExpectedLobUsagePattern() {
- // My attempts on Derby show this not working with CLOBs or BLOBs.
- // An example of the error message I get with CLOBs is:
- // A truncation error was encountered trying to shrink CLOB 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&' to length 255.
- //
- // I highly suspect this would be the case with all DB2 variant databases...
+ public boolean supportsLobValueChangePropogation() {
return false;
}
}
18 years, 1 month
Hibernate SVN: r10988 - trunk/Hibernate3/src/org/hibernate/dialect
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 13:37:01 -0500 (Wed, 13 Dec 2006)
New Revision: 10988
Modified:
trunk/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java
Log:
Derby tests
Modified: trunk/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java 2006-12-13 18:36:17 UTC (rev 10987)
+++ trunk/Hibernate3/src/org/hibernate/dialect/DerbyDialect.java 2006-12-13 18:37:01 UTC (rev 10988)
@@ -192,12 +192,7 @@
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- public boolean supportsExpectedLobUsagePattern() {
- // My attempts on Derby show this not working with CLOBs or BLOBs.
- // An example of the error message I get with CLOBs is:
- // A truncation error was encountered trying to shrink CLOB 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&' to length 255.
- //
- // I highly suspect this would be the case with all DB2 variant databases...
+ public boolean supportsLobValueChangePropogation() {
return false;
}
}
18 years, 1 month
Hibernate SVN: r10987 - trunk/Hibernate3/test/org/hibernate/test/lob
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 13:36:17 -0500 (Wed, 13 Dec 2006)
New Revision: 10987
Modified:
trunk/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml
Log:
added length attributes for running on Derby
Modified: trunk/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml 2006-12-13 18:35:33 UTC (rev 10986)
+++ trunk/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml 2006-12-13 18:36:17 UTC (rev 10987)
@@ -13,10 +13,10 @@
<property name="serialData" column="SER_DATA" type="serializable"/>
<property name="materializedClob" column="MAT_CLOB_DATA" type="text" length="15000"/>
- <property name="clobLocator" column="CLOB_DATA" type="clob" />
+ <property name="clobLocator" column="CLOB_DATA" type="clob" length="15000"/>
<property name="materializedBlob" column="MAT_BLOB_DATA" type="org.hibernate.test.lob.MaterializedBlobType" length="15000"/>
- <property name="blobLocator" column="BLOB_DATA" type="blob" />
+ <property name="blobLocator" column="BLOB_DATA" type="blob" length="15000"/>
</class>
</hibernate-mapping>
\ No newline at end of file
18 years, 1 month
Hibernate SVN: r10986 - branches/Branch_3_2/Hibernate3/test/org/hibernate/test/lob
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 13:35:33 -0500 (Wed, 13 Dec 2006)
New Revision: 10986
Modified:
branches/Branch_3_2/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml
Log:
added length attributes for running on Derby
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml 2006-12-13 15:19:12 UTC (rev 10985)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/lob/LobMappings.hbm.xml 2006-12-13 18:35:33 UTC (rev 10986)
@@ -13,10 +13,10 @@
<property name="serialData" column="SER_DATA" type="serializable"/>
<property name="materializedClob" column="MAT_CLOB_DATA" type="text" length="15000"/>
- <property name="clobLocator" column="CLOB_DATA" type="clob" />
+ <property name="clobLocator" column="CLOB_DATA" type="clob" length="15000" />
<property name="materializedBlob" column="MAT_BLOB_DATA" type="org.hibernate.test.lob.MaterializedBlobType" length="15000"/>
- <property name="blobLocator" column="BLOB_DATA" type="blob" />
+ <property name="blobLocator" column="BLOB_DATA" type="blob" length="15000" />
</class>
</hibernate-mapping>
\ No newline at end of file
18 years, 1 month
Hibernate SVN: r10985 - branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 10:19:12 -0500 (Wed, 13 Dec 2006)
New Revision: 10985
Modified:
branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java
Log:
lenient of non-FunctionalTestCase cases
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java 2006-12-13 15:19:01 UTC (rev 10984)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java 2006-12-13 15:19:12 UTC (rev 10985)
@@ -43,11 +43,14 @@
}
public void addTest(Test test) {
+ log.trace( "adding test [" + test + "]" );
if ( settings == null ) {
- settings = ( ExecutionEnvironment.Settings ) test;
+ if ( test instanceof ExecutionEnvironment.Settings ) {
+ settings = ( ExecutionEnvironment.Settings ) test;
+ // todo : we could also centralize the skipping of "database specific" tests here
+ // instead of duplicating this notion in AllTests and DatabaseSpecificFunctionalTestCase.
+ }
}
- // todo : we could also centralize the skipping of "database specific" tests here
- // instead of duplicating this notion in AllTests and DatabaseSpecificFunctionalTestCase.
testCount++;
super.addTest( test );
}
@@ -59,12 +62,7 @@
}
try {
log.info( "Starting test-suite [" + getName() + "]" );
- try {
- setUp();
- }
- catch( Throwable t ) {
- environmentSetupError = t;
- }
+ setUp();
testPosition = 0;
super.run( testResult );
}
@@ -85,26 +83,39 @@
testResult.endTest( test );
return;
}
- FunctionalTestCase functionalTest = ( ( FunctionalTestCase ) test );
- try {
- if ( ++testPosition < testCount ) {
- // disallow rebuilding the schema because this is the last test
- // in this suite, thus it is about to get dropped immediately
- // afterwards anyway...
- environment.setAllowRebuild( true );
+ if ( ! ( test instanceof FunctionalTestCase ) ) {
+ super.runTest( test, testResult );
+ }
+ else {
+ FunctionalTestCase functionalTest = ( ( FunctionalTestCase ) test );
+ try {
+ if ( ++testPosition < testCount ) {
+ // disallow rebuilding the schema because this is the last test
+ // in this suite, thus it is about to get dropped immediately
+ // afterwards anyway...
+ environment.setAllowRebuild( true );
+ }
+ functionalTest.setEnvironment( environment );
+ super.runTest( functionalTest, testResult );
}
- functionalTest.setEnvironment( environment );
- super.runTest( functionalTest, testResult );
+ finally {
+ functionalTest.setEnvironment( null );
+ }
}
- finally {
- functionalTest.setEnvironment( null );
- }
}
protected void setUp() {
+ if ( settings == null ) {
+ return;
+ }
log.info( "Building aggregated execution environment" );
- environment = new ExecutionEnvironment( settings );
- environment.initialize();
+ try {
+ environment = new ExecutionEnvironment( settings );
+ environment.initialize();
+ }
+ catch( Throwable t ) {
+ environmentSetupError = t;
+ }
}
protected void tearDown() {
18 years, 1 month
Hibernate SVN: r10984 - trunk/Hibernate3/test/org/hibernate/junit/functional
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 10:19:01 -0500 (Wed, 13 Dec 2006)
New Revision: 10984
Modified:
trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java
Log:
lenient of non-FunctionalTestCase cases
Modified: trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java 2006-12-13 14:52:34 UTC (rev 10983)
+++ trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestClassTestSuite.java 2006-12-13 15:19:01 UTC (rev 10984)
@@ -35,7 +35,7 @@
/**
* Constructor form used during {@link org.hibernate.test.AllTests} filtering...
- *
+ *
* @param name The name.
*/
private FunctionalTestClassTestSuite(String name) {
@@ -43,11 +43,14 @@
}
public void addTest(Test test) {
+ log.trace( "adding test [" + test + "]" );
if ( settings == null ) {
- settings = ( ExecutionEnvironment.Settings ) test;
+ if ( test instanceof ExecutionEnvironment.Settings ) {
+ settings = ( ExecutionEnvironment.Settings ) test;
+ // todo : we could also centralize the skipping of "database specific" tests here
+ // instead of duplicating this notion in AllTests and DatabaseSpecificFunctionalTestCase.
+ }
}
- // todo : we could also centralize the skipping of "database specific" tests here
- // instead of duplicating this notion in AllTests and DatabaseSpecificFunctionalTestCase.
testCount++;
super.addTest( test );
}
@@ -59,12 +62,7 @@
}
try {
log.info( "Starting test-suite [" + getName() + "]" );
- try {
- setUp();
- }
- catch( Throwable t ) {
- environmentSetupError = t;
- }
+ setUp();
testPosition = 0;
super.run( testResult );
}
@@ -85,26 +83,39 @@
testResult.endTest( test );
return;
}
- FunctionalTestCase functionalTest = ( ( FunctionalTestCase ) test );
- try {
- if ( ++testPosition < testCount ) {
- // disallow rebuilding the schema because this is the last test
- // in this suite, thus it is about to get dropped immediately
- // afterwards anyway...
- environment.setAllowRebuild( true );
+ if ( ! ( test instanceof FunctionalTestCase ) ) {
+ super.runTest( test, testResult );
+ }
+ else {
+ FunctionalTestCase functionalTest = ( ( FunctionalTestCase ) test );
+ try {
+ if ( ++testPosition < testCount ) {
+ // disallow rebuilding the schema because this is the last test
+ // in this suite, thus it is about to get dropped immediately
+ // afterwards anyway...
+ environment.setAllowRebuild( true );
+ }
+ functionalTest.setEnvironment( environment );
+ super.runTest( functionalTest, testResult );
}
- functionalTest.setEnvironment( environment );
- super.runTest( functionalTest, testResult );
+ finally {
+ functionalTest.setEnvironment( null );
+ }
}
- finally {
- functionalTest.setEnvironment( null );
- }
}
protected void setUp() {
+ if ( settings == null ) {
+ return;
+ }
log.info( "Building aggregated execution environment" );
- environment = new ExecutionEnvironment( settings );
- environment.initialize();
+ try {
+ environment = new ExecutionEnvironment( settings );
+ environment.initialize();
+ }
+ catch( Throwable t ) {
+ environmentSetupError = t;
+ }
}
protected void tearDown() {
18 years, 1 month
Hibernate SVN: r10983 - branches/Branch_3_2/Hibernate3
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 09:52:34 -0500 (Wed, 13 Dec 2006)
New Revision: 10983
Modified:
branches/Branch_3_2/Hibernate3/build.xml
Log:
allow externalized definition of where to find JDBC drivers
Modified: branches/Branch_3_2/Hibernate3/build.xml
===================================================================
--- branches/Branch_3_2/Hibernate3/build.xml 2006-12-13 14:51:54 UTC (rev 10982)
+++ branches/Branch_3_2/Hibernate3/build.xml 2006-12-13 14:52:34 UTC (rev 10983)
@@ -79,11 +79,19 @@
<fileset refid="fs.lib" />
</path>
- <!-- fileset definition for the jdbc directory -->
- <fileset id="fs.jdbc" dir="${dir.jdbc}">
- <include name="**/*.jar" />
- <include name="**/*.zip" />
- </fileset>
+ <!-- path definition for the JDBC driver(s) -->
+ <path id="path.jdbc">
+ <!-- By default include everything in the ${dir.jdbc} directory -->
+ <fileset dir="${dir.jdbc}">
+ <include name="**/*.jar" />
+ <include name="**/*.zip" />
+ </fileset>
+ <!-- And the explicitly defined jar.driver property (used by the CC scripts) -->
+ <pathelement path="${jar.driver}"/>
+ </path>
+ <!-- allows external definition of the JDBC classpath fragment -->
+ <property name="hibernate.test.jdbc.fs.importFile" value="doNotImport" />
+ <import file="${hibernate.test.jdbc.fs.importFile}" optional="true" />
<!-- patternset for insturmentation-eligible resources -->
<patternset id="ps.instrument.domain">
@@ -269,7 +277,7 @@
from AllTests and then performs the filtering based on that
-->
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
@@ -279,11 +287,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -308,11 +315,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -331,11 +337,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -355,11 +360,10 @@
<junit printsummary="yes" fork="yes" haltonfailure="yes" dir="${basedir}">
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -375,11 +379,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -458,7 +461,7 @@
<java classname="org.hibernate.auction.Main" fork="true" failonerror="true">
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.eg}" />
<pathelement path="${dir.build}/${jar.name}.jar"/>
<pathelement path="${dir.props}" />
18 years, 1 month
Hibernate SVN: r10982 - trunk/Hibernate3
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-13 09:51:54 -0500 (Wed, 13 Dec 2006)
New Revision: 10982
Modified:
trunk/Hibernate3/build.xml
Log:
allow externalized definition of where to find JDBC drivers
Modified: trunk/Hibernate3/build.xml
===================================================================
--- trunk/Hibernate3/build.xml 2006-12-13 00:14:17 UTC (rev 10981)
+++ trunk/Hibernate3/build.xml 2006-12-13 14:51:54 UTC (rev 10982)
@@ -79,11 +79,19 @@
<fileset refid="fs.lib" />
</path>
- <!-- fileset definition for the jdbc directory -->
- <fileset id="fs.jdbc" dir="${dir.jdbc}">
- <include name="**/*.jar" />
- <include name="**/*.zip" />
- </fileset>
+ <!-- path definition for the JDBC driver(s) -->
+ <path id="path.jdbc">
+ <!-- By default include everything in the ${dir.jdbc} directory -->
+ <fileset dir="${dir.jdbc}">
+ <include name="**/*.jar" />
+ <include name="**/*.zip" />
+ </fileset>
+ <!-- And the explicitly defined jar.driver property (used by the CC scripts) -->
+ <pathelement path="${jar.driver}"/>
+ </path>
+ <!-- allows external definition of the JDBC classpath fragment -->
+ <property name="hibernate.test.jdbc.fs.importFile" value="doNotImport" />
+ <import file="${hibernate.test.jdbc.fs.importFile}" optional="true" />
<!-- patternset for insturmentation-eligible resources -->
<patternset id="ps.instrument.domain">
@@ -269,21 +277,20 @@
from AllTests and then performs the filtering based on that
-->
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
</path>
<junit printsummary="yes" dir="${basedir}" maxmemory="256M" fork="yes" forkmode="perBatch">
- <jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
+ <jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
+ <pathelement path="${dir.props}"/>
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
- <pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -308,11 +315,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -331,11 +337,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -355,11 +360,10 @@
<junit printsummary="yes" fork="yes" haltonfailure="yes" dir="${basedir}">
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<!-- support for JDWP debug
@@ -381,11 +385,10 @@
<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.driver}"/>
<pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
@@ -464,7 +467,7 @@
<java classname="org.hibernate.auction.Main" fork="true" failonerror="true">
<classpath>
<fileset refid="fs.lib" />
- <fileset refid="fs.jdbc" />
+ <path refid="path.jdbc" />
<pathelement path="${dir.out.eg}" />
<pathelement path="${dir.build}/${jar.name}.jar"/>
<pathelement path="${dir.props}" />
18 years, 1 month
Hibernate SVN: r10981 - in trunk/Hibernate3/test/org/hibernate: junit/functional test test/bidi test/legacy
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-12-12 19:14:17 -0500 (Tue, 12 Dec 2006)
New Revision: 10981
Modified:
trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java
trunk/Hibernate3/test/org/hibernate/test/AllTests.java
trunk/Hibernate3/test/org/hibernate/test/bidi/AuctionTest2.java
trunk/Hibernate3/test/org/hibernate/test/legacy/MasterDetailTest.java
Log:
cleanup
Modified: trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java 2006-12-13 00:13:43 UTC (rev 10980)
+++ trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java 2006-12-13 00:14:17 UTC (rev 10981)
@@ -377,7 +377,7 @@
* @return true if sensitive
*/
protected boolean dialectIsCaseSensitive(String testDescription) {
- if ( getDialect().areStringComparisonsCaseInsensitive() ) {
+ if ( ! getDialect().areStringComparisonsCaseInsensitive() ) {
reportSkip( "Dialect is case sensitive. ", testDescription );
return true;
}
Modified: trunk/Hibernate3/test/org/hibernate/test/AllTests.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/AllTests.java 2006-12-13 00:13:43 UTC (rev 10980)
+++ trunk/Hibernate3/test/org/hibernate/test/AllTests.java 2006-12-13 00:14:17 UTC (rev 10981)
@@ -66,7 +66,6 @@
import org.hibernate.test.legacy.CacheTest;
import org.hibernate.test.legacy.ComponentNotNullTest;
import org.hibernate.test.legacy.ConfigurationPerformanceTest;
-import org.hibernate.test.legacy.CustomSQLTest;
import org.hibernate.test.legacy.FooBarTest;
import org.hibernate.test.legacy.FumTest;
import org.hibernate.test.legacy.IJ2Test;
@@ -122,12 +121,12 @@
import org.hibernate.test.unconstrained.UnconstrainedTest;
import org.hibernate.test.unidir.BackrefTest;
import org.hibernate.test.unionsubclass.UnionSubclassTest;
+import org.hibernate.test.usercollection.UserCollectionTypeTest;
import org.hibernate.test.util.UtilSuite;
import org.hibernate.test.version.VersionTest;
import org.hibernate.test.version.db.DbVersionTest;
import org.hibernate.test.version.sybase.SybaseTimestampVersioningTest;
import org.hibernate.test.where.WhereTest;
-import org.hibernate.test.usercollection.UserCollectionTypeTest;
/**
* @author Gavin King
@@ -322,7 +321,6 @@
suite.addTest( OneToOneCacheTest.suite() );
suite.addTest( NonReflectiveBinderTest.suite() );
suite.addTest( ConfigurationPerformanceTest.suite() ); // Added to ensure we can utilize the recommended performance tips ;)
- suite.addTest( CustomSQLTest.suite() );
return filter( suite );
// return suite;
}
Modified: trunk/Hibernate3/test/org/hibernate/test/bidi/AuctionTest2.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/bidi/AuctionTest2.java 2006-12-13 00:13:43 UTC (rev 10980)
+++ trunk/Hibernate3/test/org/hibernate/test/bidi/AuctionTest2.java 2006-12-13 00:14:17 UTC (rev 10981)
@@ -9,7 +9,6 @@
import org.hibernate.Transaction;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
-import org.hibernate.dialect.Oracle9Dialect;
import junit.framework.Test;
@@ -30,10 +29,14 @@
return new FunctionalTestClassTestSuite( AuctionTest2.class );
}
+ public boolean createSchema() {
+ return getDialect().supportsExistsInSelect();
+ }
+
public void testLazy() {
-
- if ( getDialect() instanceof Oracle9Dialect ) {
- return; //ora doesn't like exists() in the select clause
+ if ( ! getDialect().supportsExistsInSelect() ) {
+ reportSkip( "dialect does not support exist fragments in the select clause", "bidi support" );
+ return;
}
Session s = openSession();
Modified: trunk/Hibernate3/test/org/hibernate/test/legacy/MasterDetailTest.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/legacy/MasterDetailTest.java 2006-12-13 00:13:43 UTC (rev 10980)
+++ trunk/Hibernate3/test/org/hibernate/test/legacy/MasterDetailTest.java 2006-12-13 00:14:17 UTC (rev 10981)
@@ -877,7 +877,7 @@
ss.close();
s.refresh(c);
- assertTrue( c.getSubcategories().size()==2 );
+ assertEquals( 2, c.getSubcategories().size() );
s.flush();
s.connection().commit();
@@ -885,7 +885,7 @@
s = openSession();
c = (Category) s.load(Category.class, id);
- assertTrue( c.getSubcategories().size()==2 );
+ assertEquals( 2, c.getSubcategories().size() );
s.delete(c);
s.flush();
s.connection().commit();
18 years, 1 month