java - Multiple column IN clause spring data jpa -
is possible have multiple columns in in
clause?
@query(nativequery = true, value = "select * table (column1, column2) in (:column1, :column2)") list<table> findbycolumn1column2in(@param("column1") list<bigdecimal> column1, @param("column2") list<bigdecimal> column2);`
expecting query this:
select * table (column1, column2) in ((1,2), (3,4), (5,6))
no works sql in, , expect result in case?
edited answer: perhaps looking this:
select * table column1 in :column1 , column2 in :column2
:column1 , :column2 both lists, not enforcing coupling between them. if want compare couple, need change application's logic.