Package org.apache.openjpa.persistence.query

Examples of org.apache.openjpa.persistence.query.DomainObject


       
        compare(jpql, o);
    }
   
    public void testCorrelatedSubquerySpecialCase2() {
        DomainObject o = qb.createQueryDefinition(Order.class);
        DomainObject c = o.join("customer");
        DomainObject a = qb.createSubqueryDefinition(c.get("accounts"));
        o.select(o)
         .where(o.literal(10000).lessThan(a.select(a.get("balance")).all()));
       
        String jpql = "select o from Order o JOIN o.customer c"
                    + " where 10000 < ALL "
                    + " (select a.balance from c.accounts a)";
       
View Full Code Here


       
        compare(jpql, o);
    }
   
    public void testRecursiveDefinitionIsNotAllowed() {
        DomainObject q = qb.createQueryDefinition(Customer.class);
        q.where(q.exists().and(q.get("name").equal("wrong")));
       
        try {
            qb.toJPQL(q);
            fail();
        } catch (RuntimeException e) {
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.query.DomainObject

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.