如何将 Zend+Doctrine2 从 Wamp 移植到 Mamp

发布于 2024-11-07 11:29:00 字数 695 浏览 0 评论 0原文

我在我的 Windows 机器上有一个自己的小应用程序,我想在工作时将其放在我的 Mac 上。

两者都是php5.3.2(使用arraycache的教义)。在 Mac 上,我通过终端更新了架构,清除了缓存并重新生成了代理。

但是,它给了我这些错误通知:

Notice: Unknown: "id" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "created" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "modified" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "name" returned as member variable from __sleep() but does not exist in Unknown on line 0

在我看来,对于对象的每个成员都是如此。我发现这个睡眠通知非常陌生......任何关于为什么会发生这种情况的线索吗?

I have a little app for myself on my windows machine which i want to put on my mac at work.

Both are php5.3.2 (doctrine using arraycache). On the mac via terminal i updated the schema, cleared cache and regenerated proxies.

But, it gives me these error notices:

Notice: Unknown: "id" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "created" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "modified" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "name" returned as member variable from __sleep() but does not exist in Unknown on line 0

And so on for every member of the object in my view. I found this sleep notice very unfamiliar... any clue as to why this is happening?

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

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

发布评论

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

评论(2

嘿哥们儿 2024-11-14 11:29:00

您的实体正在被序列化。如果您将其存储在会话中,则这种情况会透明地发生,否则它可能位于代码中的某个位置。请参阅有关 Doctrine 2 实体序列化和一些陷阱的文档:
http://www.doctrine-project .org/docs/orm/2.0/en/reference/architecture.html#serializing-entities

您需要发布一些代码来查看发生这种情况的位置或原因,但根本原因是序列化。

Your entity is being serialized. If you're storing it in session, this happens transparently, otherwise it could be somewhere in your code. See the documentation about serialization of Doctrine 2 entities, and some pitfalls:
http://www.doctrine-project.org/docs/orm/2.0/en/reference/architecture.html#serializing-entities

You'd need to post some code to see where, or why this is happening, but the underlying reason is the serialization.

骄兵必败 2024-11-14 11:29:00

检查实体类中的变量是否受保护且不是私有的

Checks if the variables are protected and not private in the entity class

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