首页 文章

Cakephp构建错误 - getSchemaCollection

提问于
浏览
-2

我是一个很新的蛋糕,并通过一个教程,让一切正常,但我现在正在开发 .

我有一个数据库设置和蛋糕介绍页面说我正在连接它,但是当我在 table 上做“蛋糕烘烤”时,我得到以下错误 .

2018-06-13 20:06:44错误:[错误]在C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ ORM \ Table.php上调用null上的成员函数getSchemaCollection() 547

我通常不想寻求帮助,但我搜索并搜索getSchemaCollection的信息,但找不到任何东西!

堆栈跟踪是

堆栈跟踪是

检测到关联的一刻 . 例外:在[C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ ORM \ Table.php,第547行]中调用null上的成员函数getSchemaCollection()2018-06-15 11:45:46错误:[错误]在第547行的C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ ORM \ Table.php中调用null上的成员函数getSchemaCollection()堆栈跟踪:

0 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ Task \ ModelTask.php(415):Cake \ ORM \ Table-> getSchema()

1 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ Task \ ModelTask.php(231):Bake \ Shell \ Task \ ModelTask-> findHasMany(Object(App \ Model \ Table \ PurchaseTable) ),数组)

2 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ Task \ ModelTask.php(130):Bake \ Shell \ Task \ ModelTask-> getAssociations(Object(App \ Model \ Table \ PurchaseTable) ))

3 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ Task \ ModelTask.php(113):Bake \ Shell \ Task \ ModelTask-> getTableContext(Object(App \ Model \ Table \ PurchaseTable) ),'购买','购买')

4 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ Task \ ModelTask.php(100):Bake \ Shell \ Task \ ModelTask-> bake('Purchase')

5 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ BakeShell.php(272):Bake \ Shell \ Task \ ModelTask-> main('Purchase')

6 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ Collection \ CollectionTrait.php(51):Bake \ Shell \ BakeShell-> Bake \ Shell ('Purchase',0)

7 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ bake \ src \ Shell \ BakeShell.php(273):Cake \ Collection \ Collection-> each(Object(Closure))

8 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ Console \ Shell.php(518):Bake \ Shell \ BakeShell-> all('purchase')

9 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ Console \ CommandRunner.php(342):Cake \ Console \ Shell-> runCommand(Array,true)

10 C:\ xampp \ htdocs \ bookmarker \ vendor \ cakephp \ cakephp \ src \ Console \ CommandRunner.php(164):Cake \ Console \ CommandRunner-> runShell(Object(Bake \ Shell \ BakeShell),Array)

11 C:\ xampp \ htdocs \ bookmarker \ bin \ cake.php(12):Cake \ Console \ CommandRunner-> run(Array)

12

版本是3.6.4

乔恩

1 回答

  • 0

    您的表名是 purchase 而不是 purchases 吗?

相关问题