递归在cakephp的意思是什么? [英] what is the meaning of recursive in cakephp?

查看:87
本文介绍了递归在cakephp的意思是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很好,我有这行代码在教程我下面。然而,它没有给我提供关于递归的清晰解释。我是cakephp的新手,搜索这个递归。我希望有人可以给我一个外行解释这个代码:

well, i have this line of code in the tutorial i am following. However, it did not provided me the clear explanation regarding recursive. I am a newbie in cakephp and searched about this "recursive". I hope somebody could provide me a layman's explanation of this code:

$this->Author->recursive = 1;

谢谢

推荐答案

在Google上的第一个结果是从Cakephp本身的引用清楚的解释:
http://book.cakephp.org/2.0/en/models/model-attributes.html#recursive

First result on Google is a clear explanation from the reference of Cakephp itself: http://book.cakephp.org/2.0/en/models/model-attributes.html#recursive

这是必需的设置与模型数据相关联的记录的检索深度,以便在模型之间存在许多级别的关联时,您可以限制从查询中提取多少数据。

It is needed to set the depth of the retrieval of records associated with a model data so that you can limit how much data is fetched from the query when there are many levels of associations between your models.

这篇关于递归在cakephp的意思是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆