Package org.apache.art

Examples of org.apache.art.GeneratedColumnDep


        GeneratedColumnTestEntity m = context
                .newObject(GeneratedColumnTestEntity.class);

        m.setName("m");

        GeneratedColumnDep d = context
                .newObject(GeneratedColumnDep.class);
        d.setName("d");
        d.setToMaster(m);
        context.commitChanges();

        context.invalidateObjects(Arrays.asList(m, d));

        context.prepareForAccess(d, null, false);

        // this line caused CAY-422 error
        d.getToMaster();

        d.setName("new name");
        context.commitChanges();
    }
View Full Code Here


        DataContext context = createDataContext();
        GeneratedColumnTestEntity master1 = context
                .newObject(GeneratedColumnTestEntity.class);
        master1.setName("aaa");

        GeneratedColumnDep dependent = context
                .newObject(GeneratedColumnDep.class);
        dependent.setName("aaa");
        dependent.setToMaster(master1);

        context.commitChanges();

        // change master
        GeneratedColumnTestEntity master2 = context
                .newObject(GeneratedColumnTestEntity.class);
        master2.setName("bbb");

        // TESTING THIS
        dependent.setToMaster(master2);
        context.commitChanges();

        int id1 = DataObjectUtils.intPKForObject(master2);
        assertTrue(id1 >= 0);
View Full Code Here

        DataContext context = createDataContext();
        GeneratedColumnTestEntity idObject = context
                .newObject(GeneratedColumnTestEntity.class);
        idObject.setName("aaa");

        GeneratedColumnDep dependent = idObject
                .getObjectContext()
                .newObject(GeneratedColumnDep.class);
        dependent.setName("aaa");
        dependent.setToMaster(idObject);

        context.commitChanges();

        // this will throw an exception if id wasn't generated
        int id1 = DataObjectUtils.intPKForObject(idObject);
View Full Code Here

TOP

Related Classes of org.apache.art.GeneratedColumnDep

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.