Spring 嵌套投影
我使用的是SpringData1.13和Spring-boot-starter-Data-jpa-1.5.4。(无法升级) 我只需要获取嵌套实体中的几个字段,并且我有多个可选的搜索条件Spring 嵌套投影,spring,jpa,nested,spring-data,Spring,Jpa,Nested,Spring Data,我使用的是SpringData1.13和Spring-boot-starter-Data-jpa-1.5.4。(无法升级) 我只需要获取嵌套实体中的几个字段,并且我有多个可选的搜索条件 public class Entity1 { private Entity2 e2; --> i need e2.innerEntity.field private Entity3 e3; --> i need e3.innerEntity2.field... .... other en
public class Entity1 {
private Entity2 e2; --> i need e2.innerEntity.field
private Entity3 e3; --> i need e3.innerEntity2.field...
.... other entity and fields...
}
提取950 Entity1是一项非常缓慢的任务,因为在嵌套实体上急于提取
我尝试过规范,但我不能做投影(或者我不能…)
我能做什么(谢谢你的关注…我对我的英语很抱歉