随笔分类 -  jpa

摘要:1.批量操作类定义 import java.util.List; /** * 批量操作接口 */ public interface IBatchService { /** * 批量更新 * * @param list 实体类集合 * @param <T> 表对应的实体类 */ public <T> 阅读全文
posted @ 2024-02-28 13:32 李文学 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Java-JPA原生SQL查询返回自定义DTO: import com.tjgeo.njsosms.framework.repository.IBaseRepository; import com.tjgeo.njsosms.risk.support.entity.Source; import or 阅读全文
posted @ 2024-02-28 13:28 李文学 阅读(123) 评论(0) 推荐(0) 编辑
摘要:jpa的sava与saveAll save()方法 @Transactional public <S extends T> S save(S entity) { if (this.entityInformation.isNew(entity)) { this.em.persist(entity); 阅读全文
posted @ 2024-02-21 13:06 李文学 阅读(465) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示