JavaMybatis ing property, advanced ing, javamybatis ing Property
SQL attributes of the ing file:
Id: identifier (generally the dao layer method name)
ResultType: SQL return type
ResultMap: ing type
ParameterType: parameter type
UseGeneratedKeys = "true" keyProperty = "id": Put the last auto-increment id back after the add operation is completed (Note: After the object is added, the id attribute of the object will automatically have a value)
ResultMap advanced ing:
Super class (class in class) association:
<ResultMap type = "entity type" id = "identifier">
<Id property = "id" column = "id"/>
<Result property = "" column = "database column"/>
<Association property = "attributes of class objects in Entity classes" javaType = "types of classes">
<Result property = "attribute" column = "database column"/>
</Association>
</ResultMap>
One-to-multiple: collection
<ResultMap type = "entity type" id = "identifier">
<Id property = "id" column = "id"/>
<Result property = "" column = "database column"/>
<Collection property = "Object Class collection object" ofType = "set type">
<Result property = "attribute" column = "database column"/>
</Collection>
</ResultMap>