JPA Repository 규칙
JPA Repository 에서 제공하는 인터페이스 메소드를 알아보자
Jpa Repository 기본 메소
Method and Description | void | column |
deleteAllInBatch() | void | Deletes all entites in a batch call. |
deleteInBatch(Iterable entities) | void | Deletes the given entities in a batch which means it will create a single Query. |
findAll() List | ||
findAll(Sort sort) | List | |
flush() | void | Flushes all pending changes to the database. |
getOne(ID id) | T | Returns a reference to the entity with the given identifier. |
save(Iterable entities) | List | |
saveAndFlush(T entity) | T | Saves an entity and flushes changes instantly. |
Supported keywords inside method names
Keyword | Sample | JPQL snippet |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
참고
Last updated