mybatis return value encapsulation

 The return value of mybatis
encapsulates

the resultMap custom matching rules, the ID has underlying optimization, and the attributes that are not written in the result will be automatically matched

. Combined query compound type encapsulation, association specifies

the method specified by the select attribute of the association query to the bean distribution query, and column specifies which value to pass.

Use the lazyLoadEnable attribute in the lazy loading settings for select, and then query it when we use it.

Query one -to-many: collection to define the collection, and define the encapsulation rules of the collection in the collection. The

distribution query collection also uses the select attribute, and the column specifies the parameter

discriminator to specify The column name corresponds to the java attribute, the case is used to judge the value, the

queue  value is passed {} to encapsulate, and the fetchType is used to specify the loading method.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325499167&siteId=291194637