开发者

Doctrine 2 + ZF: If I move entities into subfolders, will it lead to some knock-on effects?

I'm开发者_如何学运维 setup with Doctrine 2 on ZF, and have my entities location in my custom library directory. If I move the entities into subfolders, will this cause a knock-on effect/error?


Primary issue should be autoloading. But if you modify the autoloader config for your new namespaces and locations, then you should be fine. A similar consideration applies also to repositories.

Note that the metadata-driver-implementation that is part of your Doctrine config (probably created at Bootstrap) needs to point to a folder containing your metadata. If you are using annotations in your entities as your metadata, then the new entity path will need to be used here.

Another possibility is auto-generating of proxies. If the location of your proxies changes, then whatever process performs the autoloading needs to know that.

Just some things to look out for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜