Skip to content

Commit

Permalink
Bugfix for invalid obsolete metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Oct 18, 2023
1 parent 120f1aa commit c79d602
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/jasper/repository/spec/RefSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ public static Specification<Ref> isNotObsolete() {
return (root, query, cb) ->
cb.or(
cb.isNull(root.get(Ref_.metadata)),
cb.isNull(cb.function("jsonb_object_field", Object.class,
cb.isNull(cb.function("jsonb_object_field_text", String.class,
root.get(Ref_.metadata),
cb.literal("obsolete"))),
cb.isFalse(cb.function("jsonb_object_field", Object.class,
cb.notEqual(cb.function("jsonb_object_field_text", String.class,
root.get(Ref_.metadata),
cb.literal("obsolete")).as(Boolean.class)));
cb.literal("obsolete")),
cb.literal("true")));
}

public static Specification<Ref> isScheme(String scheme) {
Expand Down

0 comments on commit c79d602

Please sign in to comment.