-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
src/main/java/org/folio/list/repository/ListVersionRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
package org.folio.list.repository; | ||
|
||
import org.folio.list.domain.ListEntity; | ||
import org.folio.list.domain.ListVersions; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import java.util.UUID; | ||
|
||
@Repository | ||
public interface ListVersionRepository extends CrudRepository<ListVersions, UUID>{ | ||
Optional<ListVersions> findByListId(UUID listId); | ||
public interface ListVersionRepository extends CrudRepository<ListVersions, UUID> { | ||
// @Query( | ||
// value = """ | ||
// SELECT lv FROM ListVersions lv WHERE lv.listId = :listId | ||
// """, | ||
// countQuery = """ | ||
// SELECT count(*) FROM ListVersions lv WHERE lv.listId = :listId | ||
// """ | ||
// ) | ||
List<ListVersions> findByListId(UUID listId); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters