-
-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Entity/Document/CouchDocument auto-detection #86
Comments
Still waiting on that blog post :) Until another best pratice is determained this is still the best solution imo. |
i would be happy if we can improve the current situation. in order to handle clashes better, we might also want to support black listing and now just white listing when the user has to manually decide which Bundles use what manager. but we also need to ensure things stay easy to config even for Bundles that provide models for different managers that the user wants to use in the same app |
note that we since then have a compiler pass helper for bundles that want to support multiple doctrine variants. auto-detection maybe is just too much. http://symfony.com/doc/current/cookbook/doctrine/mapping_model_classes.html FOSUserBundle does it like this to be compatible with older versions of DoctrineBundle |
making auto_mapping pointing to the bundle itself can be an issue because it would mean that Doctrine will need to run annotations on the whole bundle when you ask for entity classes. The second part is indeed covered by the new compiler passes |
As far as I see logic of this is in symfony doctrine bridge, so if this is important, this issue should be raised there. And as far as we see, this didn't gaing much traction and issue itself is confusing - title talks about different things than description and description proposes two different things. If comments address right thing, we agree with @stof and @dbu opinion that making automapping scan whole bundle dir by default might be too much. Feel free to reopen issue with more concrete proposal. |
The auto detection and differentiation between Entity/Document/CouchDocument folders is really a pain.
The FOS Bundles went to an ugly MappedSuperClass + Extend pattern to work around this.
In general Doctrine is a DataMapper, because its supposed to be persistence ignorant. All the classes can be in any folder.
Idea:
The text was updated successfully, but these errors were encountered: