Why no support for ARRAY type?

1,995 views
Skip to first unread message

daver

unread,
Jun 17, 2010, 11:20:19 AM6/17/10
to mybatis-user
Can anyone offer some information about why MyBatis doesn't support
the ARRAY type for JDBC?

Thanks,
-Dave

Clinton Begin

unread,
Jun 17, 2010, 11:35:27 AM6/17/10
to mybati...@googlegroups.com
The only reason is that in 8 years there wasn't enough demand, and/or
an implementation was never submitted for review and addition to the
framework.

Cheers,
Clinton

daver

unread,
Jun 17, 2010, 12:56:47 PM6/17/10
to mybatis-user
Fair enough. It looks like there's an existing custom type handler
example on StackOverflow about how to do this if you're so inclined...

http://stackoverflow.com/questions/136034/pass-and-return-custom-array-object-in-ibatis-and-oracle-in-java

Not a deal-breaker, just a curiosity. Thanks Clinton.

Ymer

unread,
Jun 29, 2010, 8:31:01 AM6/29/10
to mybatis-user
Except that this example is for ibatis 2 and to me it does not look
usable in mybatis.
Because there is no way to map jdbcType ARRAY since it's not existing?


<typeHandler javaType="java.util.ArrayList" jdbcType="ARRAY"

causes:

org.apache.ibatis.builder.BuilderException: Error resolving JdbcType.
Cause: java.lang.IllegalArgumentException: No enum const class
org.apache.ibatis.type.JdbcType.ARRAY

Whymer


On 17 Juni, 18:56, daver <rodenba...@gmail.com> wrote:
> Fair enough.  It looks like there's an existing custom type handler
> example on StackOverflow about how to do this if you're so inclined...
>
> http://stackoverflow.com/questions/136034/pass-and-return-custom-arra...
Reply all
Reply to author
Forward
0 new messages