Examples of clearFetchGroups()


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

  public void testFetchBySubClassFieldNameA() {
    OpenJPAEntityManager em = emf.createEntityManager();
    FetchPlan fp = em.getFetchPlan();
        fp.setExtendedPathLookup(true);
    fp.clearFetchGroups();
    fp.clearFields();
    fp.addField(FetchA.class.getName() + ".b");
    fp.addField(FetchA.class.getName() + ".text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
View Full Code Here

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

 
  public void testFetchBySuperClassFieldName() {
    OpenJPAEntityManager em = emf.createEntityManager();
    FetchPlan fp = em.getFetchPlan();
        fp.setExtendedPathLookup(true);
    fp.clearFetchGroups();
    fp.clearFields();
    fp.addField(FetchA.class.getName() + ".b");
    fp.addField(FetchBase.class.getName() + ".text");

    FetchA a = (FetchA) em.createQuery(JPQL).getSingleResult();
View Full Code Here

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

        fetch.removeFetchGroup("baz");
        fetch.removeFetchGroup("c");
        checkGroups(pm, new String[]{ "foo", "a", "b", "d" });

        fetch.clearFetchGroups().addFetchGroup(FetchPlan.GROUP_DEFAULT);
        checkGroups(pm, new String[0]);
    }

    private void checkGroups(OpenJPAEntityManager pm, String[] groups) {
        HashSet groupSet = new HashSet(Arrays.asList(groups));
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.