-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
find all should always return the visible entities
- Loading branch information
1 parent
e442d4a
commit 2804d75
Showing
20 changed files
with
66 additions
and
35 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
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
4 changes: 1 addition & 3 deletions
4
backend/src/main/java/ch/puzzle/okr/repository/KeyResultRepository.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,10 +1,8 @@ | ||
package ch.puzzle.okr.repository; | ||
|
||
import ch.puzzle.okr.models.Objective; | ||
import ch.puzzle.okr.models.keyresult.KeyResult; | ||
import java.util.List; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface KeyResultRepository extends DeleteRepository<KeyResult, Long> { | ||
List<KeyResult> findByObjectiveId(Long objectiveId); | ||
List<KeyResult> findByObjectiveIdAndIsDeletedFalse(Long objectiveId); | ||
} |
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
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
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
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
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
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
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
8 changes: 7 additions & 1 deletion
8
backend/src/main/java/ch/puzzle/okr/service/persistence/customCrud/HardDelete.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,13 +1,19 @@ | ||
package ch.puzzle.okr.service.persistence.customCrud; | ||
|
||
import ch.puzzle.okr.models.Deletable; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
import java.util.List; | ||
|
||
|
||
public class HardDelete<T, I, R extends CrudRepository<T, I>> extends DeleteMethod<T, I, R>{ | ||
|
||
@Override | ||
public void deleteById(I id) { | ||
this.repo.deleteById(id); | ||
} | ||
|
||
@Override | ||
public Iterable<T> findAll() { | ||
return this.repo.findAll(); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
backend/src/main/resources/db/migration/V3_5_2__add_is_deleted_flag.sql
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,2 +1,22 @@ | ||
ALTER TABLE team | ||
add COLUMN is_deleted boolean not null default false; | ||
|
||
ALTER TABLE objective | ||
add COLUMN is_deleted boolean not null default false; | ||
|
||
ALTER TABLE key_result | ||
add COLUMN is_deleted boolean not null default false; | ||
|
||
|
||
ALTER TABLE check_in | ||
add COLUMN is_deleted boolean not null default false; | ||
|
||
|
||
ALTER TABLE action | ||
add COLUMN is_deleted boolean not null default false; | ||
|
||
ALTER TABLE unit | ||
add COLUMN is_deleted boolean not null default false; | ||
|
||
ALTER TABLE person | ||
add COLUMN is_deleted boolean not null default false; |