CodeIgniter模型调试错误

发布于 2024-09-04 20:44:36 字数 320 浏览 3 评论 0原文

我是 CodeIgniter 的新手,我需要一种方法来获取更有意义的错误消息。具体来说,我在某些模型关系方面遇到了麻烦,但错误很模糊。我愿意尝试/安装任何东西,因为我不知道如何修复这种关系。

有没有办法指定错误消息的详细程度?另外,这可能与 DataMapper 有关,但我不能告诉。我不在乎它们是否已登录或在浏览器中。

在我的浏览器中,错误显示:

An Error Was Encountered
Unable to relate X with Y.

任何更多信息都会很棒...哪个类、行号、堆栈跟踪。增加日志阈值没有帮助。

I am new to CodeIgniter, and I need a way to get more meaningful error messages. Specifically I am having trouble with some model relationships, but the error is vague. I am willing to try/install anything since I dont know how to fix this relationship.

Is there a way to specify how verbose an error message is? Also, this could be related to DataMapper, but I cant tell. I dont care if they are logged or in the browser.

In my browser error reads:

An Error Was Encountered
Unable to relate X with Y.

Any more info would be great... which class, line number, a stacktrace. Increasing the log threshold did not help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夕色琉璃 2024-09-11 20:44:36

这是数据映射器错误消息。

看起来您正在从 X 请求关联条目并引用 Y。很可能您没有正确定义两个表之间的关系。请记住,您必须定义两个模型的关系(通常是一个“has_many”和一个“has_one”)。

This is a datamapper error message.

It looks like you are requesting the assocaites entries from X with a reference to Y. It is most likely that you have not properly defined the relationships between the two tables. Remember that you have to define the relationship for both models (most often one 'has_many' and one 'has_one').

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文