gpt4 book ai didi

php - Idiorm/Paris 将命名空间名称添加到我的列中

转载 作者:行者123 更新时间:2023-11-30 01:12:12 24 4
gpt4 key购买 nike

我正在尝试让 Idiorm/Paris 与我的 PHP 项目一起工作。我的表对象位于名为项目的文件夹/命名空间中,当我尝试运行 Idiorm/Paris 时,它将“项目”名称添加到列中。

"Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'project_store_id' in 'where clause''"

project_store_id 应该只是 store_id,有人知道我该如何解决这个问题吗?我想它会尝试猜测并且几乎是正确的,只是不想手动修复所有内容。

最佳答案

我最终使用了手动解决方案,即告诉要使用哪些列。

return $this->has_many('Project\Product', 'store_id', 'id');

关于php - Idiorm/Paris 将命名空间名称添加到我的列中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19381416/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com