use of org.jpox.samples.interfaces.ShapeHolder4 in project tests by datanucleus.
the class InterfacesTest method testMultipleImplWithMissingColumns.
/**
* Test a scenario that all columns are declared for an interface field
* that has ColumnMetaData specified for only 1 implementation.
*/
public void testMultipleImplWithMissingColumns() throws Exception {
try {
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
try {
// Create container and some shapes
tx.begin();
ShapeHolder4 holder = new ShapeHolder4(101);
Circle circle = new Circle(1, 102.0);
holder.setShape1(circle);
pm.makePersistent(holder);
tx.commit();
fail("Expected exception, for wrong declared columns");
} catch (Exception e) {
// Do nothing
} finally {
if (tx.isActive()) {
tx.rollback();
}
pm.close();
}
} finally {
}
}
Aggregations