SpringBoot Data JPA规范不适用于1.5.10版本的IN CLUASE。

时间:2018-07-25 13:50:17

标签: spring-boot spring-data-jpa in-clause

以下代码对于Spring boot org.springframework.boot 版本 2.0.3.RELEASE 来说工作得很好,在这里我尝试应用 IN 条款。

//导入

import org.springframework.context.annotation.DeferredImportSelector.Group;
import javax.persistence.criteria.Predicate;

//代码

final Collection<Predicate> predicates = new ArrayList<>();
...
final Path<Group> group = root.<Group> get("countryId");
predicates.add(group.in(selected_country_ids));

但是,Group似乎无法在 org.springframework.boot 版本 1.5.10.RELEASE

中运行

0 个答案:

没有答案