I'm trying to write a method which for given list of String values will return list of String values not existing in some column of the some table in the db.
So, for example, if we have table t with column c and inserted values "1", "2" and "3", and we pass list ["1", "2", "4", "5"] to the method, it should return ["4", "5"].
I tried something like this:
@Query(value = "select t.id from :list as t(id) left join table_name s " +
"on s.column_name= t.id where s.column_name is null", nativeQuery = true)
List<String> findNonExistingValues(List<String> list);
but it is not working as i hoped giving the error:
syntax error at or near "$1"
Thanks in advance.