解释One2Many对象

This commit is contained in:
Heeexy
2017-12-27 22:12:48 +08:00
parent 0a808f5259
commit aa7f0c9ab2
@@ -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 {