Package org.apache.openjpa.persistence.query.Customer

Examples of org.apache.openjpa.persistence.query.Customer.CreditRating


    public void testUpdateWithCorrelatedSubquery() {
        String update = "update Customer c set c.creditRating = ?1 where EXISTS" +
           " (select o from  in(c.orders)  o)";
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        CreditRating creditRating = CreditRating.GOOD;
        int updateCount = em.createQuery(update).
            setParameter(1, creditRating).executeUpdate();
        em.getTransaction().rollback();
        em.close();
    }
View Full Code Here


    public void testUpdateWithCorrelatedSubquery() {
        String update = "update Customer c set c.creditRating = ?1 where EXISTS" +
           " (select o from  in(c.orders)  o)";
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        CreditRating creditRating = CreditRating.GOOD;
        int updateCount = em.createQuery(update).
            setParameter(1, creditRating).executeUpdate();
        em.getTransaction().rollback();
        em.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.query.Customer.CreditRating

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.