I have been working with Hibernate for some time and I do not understand why they are complicated when making bbdd queries:
Root<Foo> fooRoot = criteriaQuery.from(Foo.class);
Join<Foo, Foo1> foo1 = fooRoot.join("foo1", JoinType.LEFT);
When you can simply:
criteriaQuery.from(Foo.class).list();
What advantages does it bring to create the Join by hand when you already have defined in your configuration file or annotations how the entities of your model are related. If it is for performance, hibernate does not recover the data until you expressly consent to that data.
Thanks for the answers.