Search in sources :

Example 31 with GameLocal

use of org.apache.openejb.test.entity.cmr.manytomany.GameLocal in project tomee by apache.

the class ManyToManyComplexPkTests method testBSetAExistingANewB.

public void testBSetAExistingANewB() throws Exception {
    resetDB();
    beginTransaction();
    try {
        final PlatformLocal platform = findPlatform(new Integer(1));
        final GameLocal game = createGame(new Integer(33));
        final Set<PlatformLocal> platformSets = game.getPlatforms();
        platformSets.add(platform);
    } finally {
        completeTransaction();
    }
    assertLinked(1, 33);
}
Also used : GameLocal(org.apache.openejb.test.entity.cmr.manytomany.GameLocal) PlatformLocal(org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal)

Aggregations

GameLocal (org.apache.openejb.test.entity.cmr.manytomany.GameLocal)31 PlatformLocal (org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal)30 Iterator (java.util.Iterator)12 ResultSet (java.sql.ResultSet)10 HashSet (java.util.HashSet)10 Set (java.util.Set)10 ConcurrentModificationException (java.util.ConcurrentModificationException)8 Connection (java.sql.Connection)2 SQLException (java.sql.SQLException)2 Statement (java.sql.Statement)2