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.
精彩评论