I would like to define array of string in mybatis mapper and pass it as argument for java static method. It's possible?
-
I don't think there's an out of the box TypeHandler for it (I may be wrong). However, it should be pretty straightforward to write one for arrays. See mybatis.org/mybatis-3/configuration.html#typeHandlers. Essentialy, you just need to create a class that extends mybatis.org/mybatis-3/apidocs/org/apache/ibatis/type/… and then tell MyBatis which column(s) should use it (while reading and storing data).The Impaler– The Impaler2021-12-02 17:41:09 +00:00Commented Dec 2, 2021 at 17:41
-
Maybe there is an out of the box Array Type Handler, but I haven't tried it. See mybatis.org/mybatis-3/apidocs/org/apache/ibatis/type/…The Impaler– The Impaler2021-12-02 17:42:28 +00:00Commented Dec 2, 2021 at 17:42
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.Community– Community Bot2021-12-07 13:33:06 +00:00Commented Dec 7, 2021 at 13:33
Add a comment
|