Skip to content

Commit 9e3192e

Browse files
authored
Merge pull request #148 from devcordde/replace-ignore-where-with-true
Update micronaut and use @IgnoreWhere
2 parents 897de98 + f641692 commit 9e3192e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*.zip
1919
*.tar.gz
2020
*.rar
21+
*.gz
2122

2223
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2324
hs_err_pid*

backend/src/main/java/club/devcord/devmarkt/repositories/TemplateRepo.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import club.devcord.devmarkt.entities.template.Template;
2020
import io.micronaut.context.annotation.Executable;
21+
import io.micronaut.data.annotation.IgnoreWhere;
2122
import io.micronaut.data.annotation.Join;
2223
import io.micronaut.data.annotation.Join.Type;
2324
import io.micronaut.data.annotation.Query;
24-
import io.micronaut.data.annotation.Where;
2525
import io.micronaut.data.jdbc.annotation.JdbcRepository;
2626
import io.micronaut.data.repository.CrudRepository;
2727
import java.util.List;
@@ -34,7 +34,7 @@ public interface TemplateRepo extends CrudRepository<Template, Integer> {
3434
boolean existsByName(String name);
3535

3636
@Override
37-
@Where("true")
37+
@IgnoreWhere
3838
@Join(value = "questions", type = Type.LEFT_FETCH)
3939
Optional<Template> findById(@javax.validation.constraints.NotNull Integer integer);
4040

@@ -51,8 +51,7 @@ public interface TemplateRepo extends CrudRepository<Template, Integer> {
5151

5252
List<String> findName();
5353

54-
@Where("true")
55-
// replaced the @Where conditions of the entity, so that we're able to find soft deleted templates.
54+
@IgnoreWhere
5655
@Join(value = "questions", type = Type.LEFT_FETCH)
5756
Optional<Template> findById(int id);
5857
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
micronautVersion=3.5.3
16+
micronautVersion=3.6.0

0 commit comments

Comments
 (0)