Different parameterType, parameterMap, resultType and the resultMap

ResultMap and ResultType

They are used to represent the query result set and a relationship between a java object, the query result set, mapped according to a relationship java object.

ResultMap the query result set columns to-one mapping individual attributes java object up, the mapping relationship here, is based on user configuration "resultMap" sub-tab to decide, flexible, commonly used in multi-table query and query using an alias.

ParameterMap (not recommended) and parameterType     

ParameterMap ResultMap and the like, provided the field mapping parameters, rarely used (not recommended)

ParameterType generally used to directly query result column values ​​correspond to the type of automatic java object type attribute, no need to configure the mapping-one relationship.

Published 35 original articles · won praise 2 · Views 1379

Guess you like

Origin blog.csdn.net/weixin_41001497/article/details/104025837