I received an array of columns from Frontend. I need SELECT ---- WHERE [Received Array] = 1. However, the length of the array is dynamic.
That is, a query with a value of 1 should be written for each column received in the array.
@Select("SELECT * FROM reservation WHERE product_type = #{product_type} AND product_location = #{product_location} AND $(myArray) = 1")
List<product> getOptionedProduct(@Param("product_type") String product_type, @Param("product_location") String product_location, @Param("myArray") List<String> myArray);
myArray has [A, B, C] I want to write like
@Select("SELECT * FROM reservation WHERE product_type = #{product_type} AND product_location = #{product_location} AND A = 1 AND B = 1 AND C = 1")
Is it possible?