晚上好,
让我的pojo Athor成为:
public class Author {
private long id;
private String name;
@JoinColumn(name = "id", nullable = false)
private Editor editor;
}
我想知道使用Hibernate这两个JPQL查询之间是否存在性能,执行等差异:
select a.name, b.name from Author a inner join a.editor e where a.id = 1;
和
select a.name, a.editor.name from Athor a where a.id = 1;
谢谢!