use of org.apache.cayenne.testdo.mixed_persistence_strategy.MixedPersistenceStrategy2 in project cayenne by apache.
the class MixedPersistenceStrategyIT method testConflictingField2.
/**
* This test case reproduces CAY-582 bug.
*/
@Test
public void testConflictingField2() throws Exception {
createConflictingFieldDataSet();
MixedPersistenceStrategy2 detail1 = Cayenne.objectForPK(context, MixedPersistenceStrategy2.class, 1);
MixedPersistenceStrategy2 detail2 = Cayenne.objectForPK(context, MixedPersistenceStrategy2.class, 2);
// resolve master (this is where CAY-582 exception happens)
assertEquals("n1", detail1.getMaster().getName());
assertEquals(2, detail2.getMaster().getDetails().size());
assertTrue(detail2.getMaster().getDetails() instanceof ValueHolder);
}
Aggregations