Skip to content

Commit

Permalink
fix: add quotes to automatically generated condition contexts on parent
Browse files Browse the repository at this point in the history
When generating a condition context on a parent for a property with a name that
has special meaning in CQL (like `id`), the generated filter does not work as
expected. With this change, the property name is put in quotes so that filters
with special property names work correctly.

Closes #1104
  • Loading branch information
florianesser committed May 23, 2024
1 parent 3a7ddac commit 72b243d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ protected String getPropertyReference() {
// parent is not a type
property = "value." + property;
}
return property;
// Put property name in quotes to make sure that names that have a
// special meaning in CQL (e.g. "id") are properly quoted.
return "\"" + property + "\"";
}

@Override
Expand Down

0 comments on commit 72b243d

Please sign in to comment.