Issue Details (XML | Word | Printable)

Key: JAVAEETUTORIAL-188
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Ian Evans
Reporter: Ian Evans
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
javaeetutorial

Minor error in code example in "Ordering Results" section of Criteria chapter

Created: 12/Jun/13 06:48 PM   Updated: 12/Jun/13 07:19 PM   Resolved: 12/Jun/13 07:19 PM
Component/s: doc
Affects Version/s: 7.0.1
Fix Version/s: 7.0.2

Time Tracking:
Not Specified

Tags:
Participants: Ian Evans


 Description  « Hide

There is a small error in the last code example at http://docs.oracle.com/javaee/6/tutorial/doc/gjivm.html#gjiwo

cq.orderBy(cb.asc(owner.get(Owner_.lastName), owner.get(Owner_.firstName)));

CriteriaBuilder.asc does not accept such arguments. It should probably be:

cq.orderBy(cb.asc(owner.get(Owner_.lastName)), cb.asc(owner.get(Owner_.firstName)));


Ian Evans made changes - 12/Jun/13 06:48 PM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Ian Evans added a comment - 12/Jun/13 07:19 PM

Fixed in source, and it will appear in the next update of the Tutorial.


Ian Evans made changes - 12/Jun/13 07:19 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]