Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0 Beta 6, 3.0 Beta 7
-
None
-
Oracle 11, JDK 1.6, iBATIS 3.0 Beta 7 (Build 216)
Description
The insert statement
<insert id="insertRegion" parameterType="Region">
BEGIN
INSERT INTO REGIONS (REGION_ID, REGION_NAME) VALUES (5, #
)
RETURNING REGION_ID INTO #
;
END;
</insert>
Leads to
Exception in thread "main" org.apache.ibatis.exceptions.IbatisException:
-
-
- Error updating database. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'OUT'. Cause: java.lang.ClassNotFoundException: Cannot find class: OUT
- The error may exist in test1/Mapper.xml
- The error may involve test1.Mapper.insertRegion
- The error occurred while executing an update
- Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'OUT'. Cause: java.lang.ClassNotFoundException: Cannot find class: OUT
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:95)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:82)
-
The cause seems to be in BaseBuilder.resolveParameterMode(String alias), where the line
return ParameterMode.valueOf(resolveAlias(alias).getName());
should actually be something like
return ParameterMode.valueOf(alias);