mirror of
https://github.com/leion8310/SpringBoot-Shiro-Vue.git
synced 2026-10-24 09:16:19 +00:00
解释One2Many对象
This commit is contained in:
@@ -7,7 +7,13 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author: hxy
|
||||
* @description: MyBatis的一对多JSON返回对象,
|
||||
* @description: MyBatis的一对多JSON返回对象
|
||||
* <p>
|
||||
* 处理嵌套查询结果时,MyBatis会根据bean定义的属性类型来初始化嵌套的成员变量,
|
||||
* 主要看其是不是Collection
|
||||
* 如果这里不定义,那么嵌套返回结果里就只能返回一对一的结果,而不是一对多的
|
||||
* <p>
|
||||
* 对MyBatis源码有研究的同学看DefaultResultSetHandler.instantiateCollectionPropertyIfAppropriate()就明白了
|
||||
* @date: 2017/10/24 10:17
|
||||
*/
|
||||
public class One2Many extends JSONObject {
|
||||
|
||||
Reference in New Issue
Block a user