Skip to content

Commit

Permalink
JNG-5775 fix filterable attributes (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg authored Jun 14, 2024
1 parent 8ffad91 commit d8867d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,4 @@ public static List<ClassType> getRelatedClasses(ClassType classType) {
.sorted(Comparator.comparing(NamedElement::getFQName))
.toList();
}

public static boolean isAttributeFilterable(AttributeType attributeType) {
return !(attributeType.getDataType() instanceof BinaryType) && !attributeType.getIsMemberTypeTransient();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function serialize{{ classDataName classType "QueryCustomizer" }}(queryCu
const {
_seek,
{{# each classType.attributes as |attribute| }}
{{# if (isAttributeFilterable attribute) }}
{{# if attribute.isFilterable }}
{{ attribute.name }}: filter{{ firstToUpper attribute.name }},
{{/ if }}
{{/ each }}
Expand All @@ -24,7 +24,7 @@ export function serialize{{ classDataName classType "QueryCustomizer" }}(queryCu
const result: any = { ...rest };

{{# each classType.attributes as |attribute| }}
{{# if (isAttributeFilterable attribute) }}
{{# if attribute.isFilterable }}
if (Array.isArray(filter{{ firstToUpper attribute.name }})) {
result.{{ attribute.name }} = filter{{ firstToUpper attribute.name }}.map(({ operator, value }) => ({
operator,
Expand Down

0 comments on commit d8867d9

Please sign in to comment.