Package org.apache.cayenne.testdo.testmap

Examples of org.apache.cayenne.testdo.testmap.Painting.readPropertyDirectly()


                assertEquals(PersistenceState.COMMITTED, pi2.getPersistenceState());
                assertEquals(Cayenne.intPKForObject(p0), Cayenne.intPKForObject(pi2));

                // testing null to-one target
                Painting p1 = results.get(1);
                assertNull(p1.readPropertyDirectly(Painting.TO_PAINTING_INFO_PROPERTY));

                // there was a bug marking an object as dirty when clearing the
                // relationships
                assertEquals(PersistenceState.COMMITTED, p1.getPersistenceState());
            }
View Full Code Here


        // make sure toOne relationships from Paintings
        // are resolved...
        altPainting1.getToArtist();
        altPainting2.getToArtist();
        assertSame(altArtist, altPainting1.readPropertyDirectly("toArtist"));
        assertSame(altArtist, altPainting2.readPropertyDirectly("toArtist"));

        // delete painting
        context.deleteObjects(painting1);
        context.commitChanges();
View Full Code Here

        context.commitChanges();

        context = context1;
        Painting painting = fetchPainting();

        assertTrue(painting.readPropertyDirectly("toPaintingInfo") instanceof Fault);

        // test that taking a snapshot does not trigger a fault, and generally works well
        DataRow snapshot = ((DataContext) context).currentSnapshot(painting);

        assertEquals(paintingName, snapshot.get("PAINTING_TITLE"));
View Full Code Here

        // test that taking a snapshot does not trigger a fault, and generally works well
        DataRow snapshot = ((DataContext) context).currentSnapshot(painting);

        assertEquals(paintingName, snapshot.get("PAINTING_TITLE"));
        assertTrue(painting.readPropertyDirectly("toPaintingInfo") instanceof Fault);
    }

}
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.