Package com.mysema.query.jpa.hibernate

Examples of com.mysema.query.jpa.hibernate.HibernateQuery.from()


    @Test
    public void InnerJoin() {
        HibernateQuery hqlQuery = new HibernateQuery();
        QEmployee employee = QEmployee.employee;
        hqlQuery.from(employee);
        hqlQuery.innerJoin(employee.user, QUser.user);
        assertEquals("select employee\nfrom Employee employee\n  inner join employee.user as user", hqlQuery.toString());
    }

}
View Full Code Here


        session.save(new Cat("Bob",10));
        session.save(new Cat("Steve",11));

        QCat cat = QCat.cat;
        HibernateQuery query = new HibernateQuery(session);
        ScrollableResults results = query.from(cat).scroll(ScrollMode.SCROLL_INSENSITIVE, cat);
        while (results.next()) {
            System.out.println(results.get(0));
        }
        results.close();
    }
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.