Skip to content

Commit 249877d

Browse files
DirkMahlerjexp
authored andcommitted
append operand name in filter expressions (#72)
1 parent 957b092 commit 249877d

File tree

2 files changed

+127
-127
lines changed

2 files changed

+127
-127
lines changed

src/main/kotlin/org/neo4j/graphql/Predicates.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ data class IsNullPredicate(val fieldName: String, val op: Operators, val type: G
7171
data class ExpressionPredicate(val name: String, val op: Operators, val value: Any?, val fieldDefinition: GraphQLFieldDefinition) : Predicate {
7272
val not = if (op.not) "NOT " else ""
7373
override fun toExpression(variable: String): Cypher {
74-
val paramName: String = ProjectionBase.FILTER + paramName(variable, name, value).capitalize()
74+
val paramName: String = ProjectionBase.FILTER + paramName(variable, name, value).capitalize() + "_" + op.name
7575
val query = if (fieldDefinition.isNativeId()) {
7676
if (op.list){
7777
"${not}ID($variable) ${op.op} [id IN \$$paramName | toInteger(id)]"

0 commit comments

Comments
 (0)