ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: is there any chance the https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?
Date Tue, 05 Jan 2010 19:00:02 GMT
Darn.  It might be a bigger change then.  I'm not sure I'll have time to
look at it any time soon (maybe by end of Jan) ... if you're adventurous,
take a shot at it.  :-)

Clinton

On Tue, Jan 5, 2010 at 11:32 AM, OBender <osya_bender@hotmail.com> wrote:

>  Unfortunately it doesn’t work. Code fails with the following:
>
> -----
>
> Caused by: java.lang.NullPointerException
>
>                 at
> org.apache.ibatis.executor.resultset.FastResultSetHandler.createParameterizedResultObject(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(NestedResultSetHandler.java:97)
>
>                 at
> org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleRowValues(NestedResultSetHandler.java:75)
>
>                 at
> org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:107)
>
>                 at
> org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleResultSets(NestedResultSetHandler.java:56)
>
>                 at
> org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)
>
>                 at
> org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.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(DefaultSqlSession.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.begin@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_bender@hotmail.com> wrote:
>
> It’s a feature not a bug but pretty important one I think.
>
>
>

Mime
View raw message