Skip to content

Commit

Permalink
Added JSON index for manage identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 23, 2023
1 parent 1e35d9c commit c1bfeac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/main/java/access/config/ApplicationConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public String convertToDatabaseColumn(Set<Application> attribute) {
@SuppressWarnings("unchecked")
public Set<Application> convertToEntityAttribute(String dbData) {
Set<Map<String, String>> set = objectMapper.readValue(dbData, Set.class);
return set.stream().map(m -> new Application(m.get("manageId"), EntityType.valueOf(m.get("manageType")))).collect(Collectors.toSet());
return set.stream().map(m -> new Application(m.get("manageId"), EntityType.valueOf(m.get("manageType"))))
.collect(Collectors.toSet());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `roles`
ADD INDEX roles_manage_identifiers( (CAST(applications->'$[*].manageId' AS char(255) ARRAY)) );

0 comments on commit c1bfeac

Please sign in to comment.