CHAPTER 14 (Web host forum) Querying with HQL and JPA QL

CHAPTER 14 Querying with HQL and JPA QL Subqueries are an advanced technique; you should question frequent use of subqueries because queries with subqueries can often be rewritten using only joins and aggregation. However, they re powerful and useful from time to time. 14.4 Summary You re now able to write a wide variety of queries in HQL and JPA QL. You learned in this chapter how to prepare and execute queries, and how to bind parameters. We ve shown you restriction, projection, joins, subselects, and many other options that you probably already know from SQL. Table 14.4 shows a summary you can use to compare native Hibernate features and Java Persistence. Table 14.4 Hibernate and JPA comparison chart for chapter 14 Hibernate Core Java Persistence and EJB 3.0 Hibernate APIs support query execution with listing, iteration, and scrolling. Java Persistence standardizes query execution with listing. Hibernate supports named and positional query bind parameters. Java Persistence standardizes named and positional bind parameter options. Hibernate query APIs support application-level query hints. Java Persistence allows developers to supply arbitrary vendor-specific (Hibernate) query hints. HQL supports SQL-like restriction, projection, joins, subselects, and function calls. JPA QL supports SQL-like restriction, projection, joins, subselects, and function calls subset of HQL. In the next chapter we focus on more advanced query techniques, such as programmatic generation of complex queries with the Criteria API and embedding of native SQL queries. We ll also talk about the query cache and when you should enable it.
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Leave a Reply