Valid 1Z0-898 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-898 Exam! ExamDiscuss.com now offer the newest 1Z0-898 exam dumps, the ExamDiscuss.com 1Z0-898 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-898 dumps with Test Engine here:
The developer wants to write a portable criteria query that will order the orders made by customer James Brown according to increasing quantity. Which one of the below queries correctly accomplishes that task?
Correct Answer: B
Explanation/Reference: Incorrect: Not A: Missing select statement. Not C: select statement should not be put last. Not D: Do not use two orderBy. Note: ORDER BY in Criteria Queries The CriteriaQuery interface provides methods for setting the ORDER BY clause. For example, the following JPQL query: SELECT c FROM Country c ORDER BY c.currency, c.population DESC can be built using the criteria query API as follows: CriteriaQuery<Country> q = cb.createQuery(Country.class); Root<Country> c = q.from(Country.class); q.select(c); q.orderBy(cb.asc(c.get("currency")), cb.desc(c.get("population"))); Reference: ORDER BY clause (JPQL / Criteria API)