I have a select SQL
in MyBatis
like this:
SELECT * FROM MYTABLE WHERE id IN (#{ids})
The parameter ids
I passed in is correct, which I can get while I'm debugging. And also, I can run this SQL
in MySQL
with the parameter correctly and get the results.
But nothing is gotten running with Java
code.
I printed the SQL
of MyBatis
and the SQL
is like this:
SELECT * FROM MYTABLE WHERE id IN (?)
and the parameters shown in log is correct too('1', '2', '3'
).
Why can't I get the data by code?
I'd be appreciated if anyone can help.