Package org.apache.openjpa.persistence

Examples of org.apache.openjpa.persistence.FetchPlan.removeField()


            // included in the current load. If this property isn't set, the FK for eagerOneToOneOwner will not be
            // selected.
             ((JDBCFetchPlan)fp).setIgnoreDfgForFkSelect(true);
            // Remove all relationships
            fp.removeField(OptSelectEntity.class, "eagerOneToOne");
            fp.removeField(OptSelectEntity.class, "eagerOneToOneOwner");
            fp.removeField(OptSelectEntity.class, "lazyOneToOne");
            fp.removeField(OptSelectEntity.class, "lazyOneToOneOwner");

            OptSelectEntity ee1 = em.find(OptSelectEntity.class, e1.getId());
View Full Code Here


            // selected.
             ((JDBCFetchPlan)fp).setIgnoreDfgForFkSelect(true);
            // Remove all relationships
            fp.removeField(OptSelectEntity.class, "eagerOneToOne");
            fp.removeField(OptSelectEntity.class, "eagerOneToOneOwner");
            fp.removeField(OptSelectEntity.class, "lazyOneToOne");
            fp.removeField(OptSelectEntity.class, "lazyOneToOneOwner");

            OptSelectEntity ee1 = em.find(OptSelectEntity.class, e1.getId());
View Full Code Here

             ((JDBCFetchPlan)fp).setIgnoreDfgForFkSelect(true);
            // Remove all relationships
            fp.removeField(OptSelectEntity.class, "eagerOneToOne");
            fp.removeField(OptSelectEntity.class, "eagerOneToOneOwner");
            fp.removeField(OptSelectEntity.class, "lazyOneToOne");
            fp.removeField(OptSelectEntity.class, "lazyOneToOneOwner");

            OptSelectEntity ee1 = em.find(OptSelectEntity.class, e1.getId());

            // Make sure our sql has no joins
View Full Code Here

            // Remove all relationships
            fp.removeField(OptSelectEntity.class, "eagerOneToOne");
            fp.removeField(OptSelectEntity.class, "eagerOneToOneOwner");
            fp.removeField(OptSelectEntity.class, "lazyOneToOne");
            fp.removeField(OptSelectEntity.class, "lazyOneToOneOwner");

            OptSelectEntity ee1 = em.find(OptSelectEntity.class, e1.getId());

            // Make sure our sql has no joins
            assertEquals(1, sql.size());
View Full Code Here

            assertEquals(mgr.getLastName(), findMgr.getLastName());
            assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
        }
       
        // Remove the field previously added, and verify expected behavior
        fp.removeField(empDescriptionFieldStr);
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
View Full Code Here

            assertEquals(mgr.getLastName(), findMgr.getLastName());
            assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
        }
       
        // Remove the field, and verify expected behavior
        fp.removeField(empDescriptionFieldStr);
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
View Full Code Here

            assertEquals(mgr.getLastName(), findMgr.getLastName());
            assertEquals(mgr.getDescription(), findMgr.getDescription()); // Should not be lazy-loaded
        }
       
        // Remove the "DescFetchGroup" fetch group, and verify expected behavior
        fp.removeField(empDescriptionFieldStr);
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertFalse(fp.getFetchGroups().contains("DescFetchGroup"));
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
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.