Hello.
A few weeks back, I was attempting to learn more about JOINs against JPA criteria queries. I like Criteria because it potentially eliminates all SQL text. But I ran into some problems with JOIN, because I simply could not figure out what to do with a Join object once I found out how to create one. The examples I saw made no sense. One was joining an object type to other instances of itself, and I don't think there was any mention of the join field. I did eventually get something like a join to happen, with the correct output, but it did not use anything like a Join object, so I fear that at any kind of scale it would not be efficient.
Can anyone point me to material on
Java Persistence API, that explicitly shows Joins between two different tables (two mapped objects, or possible joins involving unmapped tables), and does these joins on object fields (which are of course represented in Object space by SQL Columns)?
I have looked at the tutorials, and at one book I found. I think during the days of Hibernate Criteria, this subject was much easier to understand. I think JPA
has done a better job of encapsulating the SQL, however.
Thanks in advance.