简体   繁体   English

将Cakephp 1.3迁移到2 .x惰性模型错误

[英]migrating cakephp 1.3 to 2 .x lazy model error

I have followed this document to migrate from cakephp 1.3 to 2.X . 我已经按照该文档从cakephp 1.3迁移到2.X。 I am getting this error . 我收到此错误。

PHP Fatal error: Class 'LazyModel' not found in app/Model/AppModel.php PHP致命错误:在app / Model / AppModel.php中找不到类“ LazyModel”

I checked in the file i can see this line. 我签入了文件,我可以看到这一行。 App::import('Lib', 'LazyModel'); App :: import('Lib','LazyModel');

Help me please 请帮帮我

Remove the Lazy stuff. 删除懒惰的东西。 Cake2 brings this with it automatically. Cake2会自动将其带来。

Just make sure your models properly extend the AppModel from there on. 只要确保您的模型从那里正确扩展了AppModel。 And the AppModel extends from Model. 而AppModel是从Model扩展的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM