Examples of ReflexiveAndToOne


Examples of org.apache.cayenne.testdo.relationship.ReflexiveAndToOne

    }

    public void testQualifyOnToMany() {
        DataContext context = createDataContext();

        ReflexiveAndToOne ox = context
                .newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context
                .newObject(ReflexiveAndToOne.class);
        o2.setName("o2");
        o2.setToParent(o1);

        context.commitChanges();

        Expression qualifier = ExpressionFactory.matchExp("children", o2);
        List parents = context.performQuery(new SelectQuery(
View Full Code Here

Examples of org.apache.cayenne.testdo.relationship.ReflexiveAndToOne

    }

    public void testQualifyOnToOne() {
        DataContext context = createDataContext();

        ReflexiveAndToOne ox = context
                .newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context
                .newObject(ReflexiveAndToOne.class);
        o2.setName("o2");
        o2.setToParent(o1);

        context.commitChanges();

        Expression qualifier = ExpressionFactory.matchExp("toParent", o1);
        List children = context.performQuery(new SelectQuery(
View Full Code Here

Examples of org.apache.cayenne.testdo.relationship.ReflexiveAndToOne

        dbHelper.deleteAll("TO_ONEFK1");
    }

    public void testQualifyOnToMany() {

        ReflexiveAndToOne ox = context.newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context.newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context.newObject(ReflexiveAndToOne.class);
        o2.setName("o2");
        o2.setToParent(o1);

        context.commitChanges();

        Expression qualifier = ExpressionFactory.matchExp("children", o2);
        List<?> parents = context.performQuery(new SelectQuery(
View Full Code Here

Examples of org.apache.cayenne.testdo.relationship.ReflexiveAndToOne

        assertEquals(0, parents.size());
    }

    public void testQualifyOnToOne() {

        ReflexiveAndToOne ox = context.newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context.newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context.newObject(ReflexiveAndToOne.class);
        o2.setName("o2");
        o2.setToParent(o1);

        context.commitChanges();

        Expression qualifier = ExpressionFactory.matchExp("toParent", o1);
        List<?> children = context.performQuery(new SelectQuery(
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.