Unfortunately it doesn't work. Code fails with the following:

-----

Caused by: java.lang.NullPointerException

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createParameterize
dResultObject(FastResultSetHandler.java:295)

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject
(FastResultSetHandler.java:281)

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject
(FastResultSetHandler.java:268)

                at
org.apache.ibatis.executor.resultset.NestedResultSetHandler.getRowValue(Nest
edResultSetHandler.java:97)

                at
org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleRowValues(
NestedResultSetHandler.java:75)

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(Fa
stResultSetHandler.java:107)

                at
org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleResultSets
(NestedResultSetHandler.java:56)

                at
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(Prepared
StatementHandler.java:40)

                at
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingSt
atementHandler.java:55)

                at
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)

                at
org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:86)

                at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:67)

                at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSe
ssion.java:58)

-----

 

This is because it tries to get a typeHandler

 

final TypeHandler typeHandler = constructorMapping.getTypeHandler();

^^^^^^^^^^^^^^^^^^^^^^^^ - null

final String column = constructorMapping.getColumn();

final Object value = typeHandler.getResult(rs, column);

 

 which is null for mapping like:

 

<arg javaType="TypeX" resultMap="TypeXResult"/>

 

I'm not familiar (yet) with the way nested result maps are handled in other
parts of the code but it seems that some info gets set correctly in to the
constructor mapping, for example the nestedresultMapId is set correctly.

 

 

From: Clinton Begin [mailto:clinton.be...@gmail.com] 
Sent: Tuesday, January 05, 2010 12:16 PM
To: user-java@ibatis.apache.org
Subject: Re: is there any chance the
https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?

 

Can you try it locally first?  Just change the DTD to allow it.  I think it
works, as I believe it's all the same builder code.  

You'll have to change the DTD URL and PUBLIC/SYSTEM to override it locally.

Clinton

On Tue, Jan 5, 2010 at 9:31 AM, OBender <osya_ben...@hotmail.com> wrote:

It's a feature not a bug but pretty important one I think.

 

Reply via email to