My query is:
SELECT id
FROM person
WHERE authority_right = ARRAY[1,2]
authority_right
is integer array. My goal is to find people who have
authority_right
exactly equal to [1,2], not [1] and not [2]. This query is executed successfully in console, but a validation error occurs when I launch my application with @Query
using the exact same code.
Error occurs in this area: ARRAY[1,2]
.
Message in logs:
expecting CLOSE_BRACKET, found ','
Message in editor:
<expression>, <operator>, GROUP, HAVING or ORDER expected, got '{'
I also tried using INT{1, 2}
and some combinations of brackets, but I haven't succeed. How can I make it work?