jpa 中的联表查询
ConstructorExpression<SafeOccupational> subject = Projections.constructor(SafeOccupational.class, safeOccupational.id,
safeOccupational.name, enterprise.id, enterprise.entName);
JPAQuery<SafeOccupational> jpaQuery = queryFactory.select(subject)
.from(safeOccupational).innerJoin(enterprise).on(safeOccupational.ownEntId.eq(enterprise.id))
.offset(pageParam.getPageIndex()).limit(pageParam

本文将探讨 JPA 中如何进行联表查询,包括基本的联表操作和高级查询技巧,帮助开发者更高效地从数据库获取关联数据。
最低0.47元/天 解锁文章
5187

被折叠的 条评论
为什么被折叠?



