Import a ResultMap from another Mapper.xml

1,104 views
Skip to first unread message

Fabrizio Starred

unread,
Mar 14, 2013, 12:40:03 PM3/14/13
to mybati...@googlegroups.com
Hi, I want to refer to an existing resultMap definied from another mapper.xml.

I have tried with this:

<resultMap id="CustomResult" type="model.custom.CustomResult">
<association property="myProperty" 
javaType="model.PropertyType" 
resultMap="xml.PropertyMapper.BaseResultMap">
</association>
</resultMap>  

but I get this error "Result Maps collection does not contain value xml.PropertyMapper.BaseResultMap".

The BaseResultMap is definied into package xml, PropertyMapper.xml is the name of the file and BaseResultMap is the ResultMap name.

Is there a way to have success referring an external ResultMap id ?

Eduardo Macarron

unread,
Mar 14, 2013, 4:16:17 PM3/14/13
to mybati...@googlegroups.com
Check the namespace of PropertyMapper.xml is "xml.PropertyMapper"

2013/3/14 Fabrizio Starred <fabrizio...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Fabrizio Stellato

unread,
Mar 14, 2013, 7:43:31 PM3/14/13
to mybati...@googlegroups.com
Where is definied namespace?
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/_o1_VimHahk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mybatis-user...@googlegroups.com.

Frank Martínez

unread,
Mar 14, 2013, 8:58:58 PM3/14/13
to mybati...@googlegroups.com

Fabrizio Stellato

unread,
Mar 15, 2013, 5:20:06 AM3/15/13
to mybati...@googlegroups.com

Great!

Thank you very much :-)
Reply all
Reply to author
Forward
0 new messages