Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Ian Evans
Reporter: Ian Evans
Votes: 0
Watchers: 0

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

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

Participants: Ian Evans

 Description  « Hide

There is a small error in the last code example at

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 ]