zoukankan      html  css  js  c++  java
  • 映射细节

    Auto_Mapping

         数据注入的方式   

         [1]自动注入方式  Auto_Mapping (自己封装的实体属性和数据库的字段是一样的情况Mybatis会自动的注入)

         [2]手动注入的方式  resultMap  

         作用:解决自己做的实体的封装和数据库的字段不一致的问题

    resultTyperesultMap使用场景

    [1]如果你做的是单表的查询并且封装的实体和数据库的字段一一对应   resultType

    [2]如果实体封装的属性和数据库的字段不一致  resultMap

    [3]使用的是多表的联合查询  resultMap

    [4]使用N+1查询的时候   resultMap

  • 相关阅读:
    IEnumerator & IEnumerable
    GameObject.Active
    Unity3D的四种坐标系
    gvim
    Platform Dependent Compilation
    delegate
    new 约束
    UIPanel
    UIButton
    UISprite
  • 原文地址:https://www.cnblogs.com/vincentmax/p/14297247.html
Copyright © 2011-2022 走看看