JPA join: can join to Entity, Embeddable or basic type.
@Entity
public class Book {
@Id String id;
@Embedded
Author author;
String name;
}
Root<Book> root = criteriaQuery.from(Book.class);
root.join("author", JoinType.LEFT);
// or
root.join("author", JoinType.INNER);
root.join("name", JoinType.INNER);
From JPA api, it is legal to join to an Embeddable and Basic type, but what does the JoinType mean? For inner join attribute "name", if book.name is null, the query will return empty results? the same for embeddable type?