anchor.diff:      .select("r.id");
   ----
   
  -will result in something like the following
  +will result in something like the following:
   
   [source,sql]
   ----
  
positive.code:     FROM Cat kitten
      ORDER BY kitten.age DESC, kitten.id DESC
      LIMIT 5
  ) topKitten(age, father.id, id, mother.id, name)
  GROUP BY c.name
  ----
  
  Note that lateral joins only work for inner and left joins. Also, not all databases support lateral joins.
  H2 and HSQL do not support that feature. MySQL only supports this since version 8. Oracle supports this since version 12.
negative.code: [source,java]
  ----
  CriteriaBuilder<Long> cb = cbf.create(em, Long.class)
      .fromEntitySubquery(Cat.class, "r")
          .orderByDesc("age")
          .orderByDesc("id")
          .setMaxResults(5)
  