小编thinkphp源码无差别阅读(三十三)ORM阅读model/concern/BelongsToMany.php属性:middle、pivotName、pivot、pivotDataName布局方法:__construct设置中间表模型:pivot设置中间表数据名称:name实例化中间模型;newPivot合成中间表模型:hydratePivot延迟获取关联数据:getRelation重载select:select重载paginate:paginate重载find:find根据关联条件查询当前模型:has根据关联条件查询当前模型:hasWhere设置中间表查询条件:wherePivot预载于关联查询:eagerlyResultSet预载于关联查询:eagerlyResult关联统计:relationCount获取关联统计子查询:getRelationCountQuery关联模型预查询:eagerlyManyToMany关联查询:belongsToManyQuery保存:save批量保存:saveAll附加关联的一个中间表数据:attach判断是否存在关联数据:attached解除关联的一个中间表数据:detach数据同步:sync根本查询:baseQuerymodel/concern/HasMany.php布局方法:__construct延迟获取关联数据:getRelation预载于关联查询:eagerlyResultSet预载于关联查询:eagerlyResult关联统计:relationCount关联统计子查询:getRelationCountQuery关联预查询:eagerlyOneToMany保存:save创建关联工具实例:make批量保存:saveAll根据关联条件查询当前模型:has根据关联条件查询当前模型:hasWhere根本查询:baseQuery操持阅读[ ] framework源码[ ] orm源码[ ] helper源码
