Dan*_*ton 3 hibernate spring-data-jpa
尝试为实体的 Iterable 创建 saveAll 方法。
完整错误是无法创建查询方法公共抽象java.lang.Iterable com.myCompany.mappingPoc.ConnectionManagerRepo.saveAll(java.lang.Iterable)!未找到 ConnectionManager 类型的属性 saveAll!
@Repository
public interface ConnectionManagerRepo extends CrudRepository<ConnectionManager, Long> {
Iterable<ConnectionManager> findAllByControlId(Long controlId);
Page<ConnectionManager> findAllByControlId(Pageable p, Long controlId);
Iterable<ConnectionManager> saveAll(Iterable<ConnectionManager> connectionManagers);
}
Run Code Online (Sandbox Code Playgroud)
正如C. Weber在他的评论中写道
CrudRepository 已经有一个
<S extends T> Iterable<S> saveAll(Iterable<S> entities);
您不需要指定您自己的。
您似乎期望此处发生某种查询派生,但该机制仅适用于以find、exists和开头count的方法delete。
| 归档时间: |
|
| 查看次数: |
5344 次 |
| 最近记录: |