javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-260

Wrong CriteriaQuery.join() examples in the Criteria API documentation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.2
    • Fix Version/s: 7.0.4
    • Component/s: doc
    • Labels:
      None

      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);

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Kim Haase
            Reporter:
            patrik.varga
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: