标签: jpa-2.0
@Entity public EntityA implements Serializable { ... @OneToOne(fetch=FetchType.LAZY) private EntityB b; ... }
如何热切地动态加载EntityB?
答案 0 :(得分:2)
使用查询:
select a from EntityA a left join fetch a.b where a.id = :id