Skip to content

Commit f5ab198

Browse files
committed
feat: upate structure to basic
Signed-off-by: Otavio Santana <[email protected]>
1 parent 86fba44 commit f5ab198

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

quarkus-pagination/src/main/java/os/expert/FruitRepository.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ public interface FruitRepository extends BasicRepository<Fruit, String> {
1818
@Find
1919
@OrderBy("name")
2020
Page<Fruit> offSet(PageRequest pageRequest);
21+
22+
long countBy();
2123
}

quarkus-pagination/src/main/java/os/expert/SetupDatabase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void onStart(@Observes StartupEvent ev) {
4646

4747
void onStop(@Observes ShutdownEvent ev) {
4848
LOGGER.info("The application is stopping...");
49-
fruitRepository.deleteAll();
49+
fruitRepository.deleteAll(fruitRepository.findAll().toList());
5050
}
5151

5252
}

0 commit comments

Comments
 (0)