You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Paul Benedict (JIRA)" <ib...@incubator.apache.org> on 2006/03/29 01:17:31 UTC
[jira] Commented: (IBATIS-225) Reuse resultmap for single bean
property
[ http://issues.apache.org/jira/browse/IBATIS-225?page=comments#action_12372163 ]
Paul Benedict commented on IBATIS-225:
--------------------------------------
It is unfortunate <result> has a @resultMap attribute because it really doesn't do what it implies. @resultMap, on the surface, should include processing from another resultMap, but it really performs a group by.
This limitation prevents me from re-using alot of resultMaps I already have defined because I deal heavily with nested objects, and it doesn't make any sense to run a @select unless I want to incur another database hit.
I would first like it renamed. If not, maybe add an @includeResultMap attribute?
> Reuse resultmap for single bean property
> ----------------------------------------
>
> Key: IBATIS-225
> URL: http://issues.apache.org/jira/browse/IBATIS-225
> Project: iBatis for Java
> Type: Improvement
> Components: SQL Maps
> Reporter: Huy Do
>
> Allow the following reuse of result maps
> <resultMap id="Pick" class="package.domain.Pick">
> <result property="pickId" column="pick_id"/>
> <result property="sale" resultMap="Sale"/>
> </resultMap>
> <resultMap id="Sale" class="Sale">
> <result column="sale_id" property="saleId"/>
> </resultMap>
> with beans
> class Pick {
> String pickId;
> Sale sale;
> }
> class Sale {
> String saleId;
> }
> At the moment <result property="sale" resultMap="Sale"/> can only be reused if property "sale" is a collection.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira