Home  >  Article  >  Backend Development  >  thinkphp3.0没关联查询了?

thinkphp3.0没关联查询了?

WBOY
WBOYOriginal
2016-06-13 11:48:30700browse

thinkphp3.0没有关联查询了???
手册中有关联模型操作的内容,但是当我使用的时候,发现没有了,报错说“Model:relation您所请求的方法不存在!”

我全盘查找了thinkphp内核中的relation关键字,一无所有……

求解释……谢谢
------解决方案--------------------
楼主 好人啊  
------解决方案--------------------
怎么搞定的。
------解决方案--------------------
Model使用错误了,应该extends RelationModel,就可以使用了
------解决方案--------------------
relation实现是木有这个方法的,你看一下RelationModel的__call这个魔术方法,什么table,field方法,其实都是木有的,基本都是用Model类的__call方法,有时间自己研究一下就明白喽。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn