Skip to content

Commit ad077a1

Browse files
committed
changed every workitemquery to use ordered query
1 parent c64c2d1 commit ad077a1

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/main/java/de/doubleslash/keeptime/model/repos/WorkRepository.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,5 @@
2727
@Repository
2828
public interface WorkRepository extends JpaRepository<Work, Long> {
2929

30-
List<Work> findByCreationDate(LocalDate creationDate);
31-
3230
List<Work> findByCreationDateOrderByStartTimeAsc(LocalDate creationDate);
3331
}

src/main/java/de/doubleslash/keeptime/view/ReportController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ private void loadCalenderWidget() {
248248
@Override
249249
public void updateItem(final LocalDate item, final boolean empty) {
250250
super.updateItem(item, empty);
251-
if (model.getWorkRepository().findByCreationDate(item).isEmpty()) {
251+
if (model.getWorkRepository().findByCreationDateOrderByStartTimeAsc(item).isEmpty()) {
252252
setDisable(true);
253253
setStyle(FX_BACKGROUND_COLOR_NOT_WORKED);
254254
}

0 commit comments

Comments
 (0)