[JAVAEETUTORIAL-260] Wrong CriteriaQuery.join() examples in the Criteria API documentation Created: 30/Jan/14  Updated: 30/Jan/14  Resolved: 30/Jan/14

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 7.0.2
Fix Version/s: 7.0.4

Type: Bug Priority: Major
Reporter: patrik.varga Assignee: Kim Haase
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: CriteriaQuery, criteria, join

 Description   

There are some examples of CriteriaQuery.join() calls in the Criteria API documentation.
Neither CriteriaQuery nor its superinterface AbstractQuery have a join() method.
These local variables should refer to the root node "pet" instead of the CriteriaQuery "cq".

Occurences in "Using the Criteria API and Metamodel API to Create Basic Typesafe Queries":

"Querying Relationships Using Joins":
Join<Owner, Address> address = cq.join(Pet_.owners).join(Owner_.addresses);

"Ordering Results":
Join<Owner, Address> address = cq.join(Pet_.owners).join(Owner_.address);
Join<Pet, Owner> owner = cq.join(Pet_.owners);



 Comments   
Comment by Kim Haase [ 30/Jan/14 ]

Thank you very much for pointing out these errors. The fixes will appear in the next Tutorial update.

We appreciate your interest in the Tutorial.

Comment by Kim Haase [ 30/Jan/14 ]

Fixed in documentation source.

Generated at Fri Jul 31 09:42:15 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.