Package org.apache.cayenne.testdo.mt

Examples of org.apache.cayenne.testdo.mt.ClientMtDeleteNullify


    @Inject
    private CayenneContext context;

    public void testNullifyToOne() {

        ClientMtDeleteNullify object = context.newObject(ClientMtDeleteNullify.class);
        object.setName("object");

        ClientMtDeleteRule related = context.newObject(ClientMtDeleteRule.class);
        object.setName("related");

        object.setNullify(related);
        context.commitChanges();

        context.deleteObject(object);
        assertFalse(related.getFromNullify().contains(object));
        assertNull(object.getNullify());

        // And be sure that the commit works afterwards, just for sanity
        context.commitChanges();
    }
View Full Code Here


    }

    public void testNullifyToOne() {
        CayenneContext context = createClientContext();

        ClientMtDeleteNullify object = context
                .newObject(ClientMtDeleteNullify.class);
        object.setName("object");

        ClientMtDeleteRule related = context
                .newObject(ClientMtDeleteRule.class);
        object.setName("related");

        object.setNullify(related);
        context.commitChanges();

        context.deleteObject(object);
        assertFalse(related.getFromNullify().contains(object));
        assertNull(object.getNullify());

        // And be sure that the commit works afterwards, just for sanity
        context.commitChanges();
    }
View Full Code Here

    @Inject
    private CayenneContext context;

    public void testNullifyToOne() {

        ClientMtDeleteNullify object = context.newObject(ClientMtDeleteNullify.class);
        object.setName("object");

        ClientMtDeleteRule related = context.newObject(ClientMtDeleteRule.class);
        object.setName("related");

        object.setNullify(related);
        context.commitChanges();

        context.deleteObjects(object);
        assertFalse(related.getFromNullify().contains(object));
        assertNull(object.getNullify());

        // And be sure that the commit works afterwards, just for sanity
        context.commitChanges();
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.testdo.mt.ClientMtDeleteNullify

Copyright © 2018 www.massapicom. 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.