Questions tagged [mybatis-sql]

sql macro tag in myBatis XML mapper.

26 questions
3
votes
3 answers

How to solve indexOutOfBounds error in MyBatis selectForUpdate?

I use postgreSQL. Here is my request in a myBatisMapper: In the above select query in my mapper file I need to get the resultMap as a List of Strings. How to implement as default Collection cannot be given directly. I tried using…
0
votes
0 answers

Is there a way to customize MyBatis auto-generated dynamic sql when java type is date and mysql is timestamp?

I use MyBatis3 Dynamic SQL (pure java generated sql without any xml mapper) in spring with mysql as db. When I have an entity with value of Date type, MyBatis will change the value to timestamp format in generated sql query. For example: public…
Xing Da
  • 11
  • 1
0
votes
1 answer

Mybatis, pass muliple list as parametres

String loadCandies(@Param("id") String id, @Param("varietyList") List varietyList, @Param("errorCode") List errorCodes) How can I achieve this in mybatis xml, as for a single list in parameter we can directly use foreach tag in where tag clause but…
Ankur
  • 19
  • 5
0
votes
1 answer

how to directly add ENUM in Mybatis IN query ,with no params

i directly have to check ENUM in where condition , AND RTRIM(INTH.IF_FILETYPE) IN
1
2