Package org.apache.cayenne.testdo.relationship

Examples of org.apache.cayenne.testdo.relationship.CollectionToMany.addToTargets()


        CollectionToManyTarget newTarget = o1
                .getObjectContext()
                .newObject(CollectionToManyTarget.class);

        o1.addToTargets(newTarget);
        assertEquals(4, targets.size());
        assertTrue(o1.getTargets().contains(newTarget));
        assertSame(o1, newTarget.getCollectionToMany());

        o1.getObjectContext().commitChanges();
View Full Code Here


        CollectionToManyTarget newTarget = o1
                .getObjectContext()
                .newObject(CollectionToManyTarget.class);

        o1.addToTargets(newTarget);
        assertEquals(4, targets.size());
        assertTrue(o1.getTargets().contains(newTarget));
        assertSame(o1, newTarget.getCollectionToMany());

        o1.getObjectContext().commitChanges();
View Full Code Here

        assertEquals(3, targets.size());

        CollectionToManyTarget newTarget = o1.getObjectContext().newObject(
                CollectionToManyTarget.class);

        o1.addToTargets(newTarget);
        assertEquals(4, targets.size());
        assertTrue(o1.getTargets().contains(newTarget));
        assertSame(o1, newTarget.getCollectionToMany());

        o1.getObjectContext().commitChanges();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.