Skip to content

Commit 7d78299

Browse files
author
Philip Z
committed
Cast school facet rows through checked SmartList mapping
1 parent b1145ba commit 7d78299

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • examples/school-management/src/main/java/com/example/schoolmanagementservice

‎examples/school-management/src/main/java/com/example/schoolmanagementservice/App.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public CommandLineRunner teaQLConsoleStartup(
184184
.comment("Facet SchoolType values including zero-count constants")
185185
.purpose("Verify Java native SQLite Facet semantics")
186186
.executeForList(context);
187-
SmartList<SchoolType> allValues = includeAllFacet.getFacet("schoolTypeFacet");
187+
SmartList<SchoolType> allValues = includeAllFacet.getFacet("schoolTypeFacet").map(SchoolType.class::cast);
188188
require(allValues != null && allValues.size() == 2,
189189
"include-all SchoolType facet did not retain both constants");
190190
Number primaryCount = allValues.get(0).getDynamicProperty("schoolCount");
@@ -205,7 +205,7 @@ public CommandLineRunner teaQLConsoleStartup(
205205
.comment("Facet only SchoolType values matched by the outer School filter")
206206
.purpose("Verify Java native SQLite matched-only Facet semantics")
207207
.executeForList(context);
208-
SmartList<SchoolType> matchedValues = matchedOnlyFacet.getFacet("schoolTypeFacet");
208+
SmartList<SchoolType> matchedValues = matchedOnlyFacet.getFacet("schoolTypeFacet").map(SchoolType.class::cast);
209209
require(matchedValues != null && matchedValues.size() == 1,
210210
"matched-only SchoolType facet must contain one value");
211211
require("PRIMARY".equals(matchedValues.get(0).getCode())

0 commit comments

Comments
 (0)