On Thu, Mar 29, 2012 at 08:53:30AM +0200, David Buchmann wrote: > > 1) i totally agree we have to avoid name clashes and will happily update > the phpcr bundle documentation and the existing bundles to not use the > Document namespace anymore, as soon as we agree on a naming scheme. > i think i like the idea of a common top folder for all those persistence > layers better than spreading the different types in the bundle root. it > also makes it more obvious what this is about. what would you think of > not using Persistence but just to use Model for the generic classes and > create the backend-specific folders as subfolders of Model? like > Model\PHPCR and so on.
I thought about this aswell and it kinda sounds correct to do so but what if the persistence stuff is more than one class? I use both a persistence object (which is the Entity in Doctrine) and also a specific manager, usually per class, in my little orm-thignie. This is also typical how Zend Framework and others do this (Model, Mapper, Maager) and we should make sure this way of doing it can be applied. It may be totally acceptable to have Model/Perfoo/Frog.php, FrogManager.php and so on like how Entity has both the Entity class and the repository (Which really annoys me at least). But does it show the separation well enough? Me thinks not. I'd rather have two separate directories from bundle-root. Model and <something>/ > 2) afaik when not using the annotation mapping but xml or yml mapping, > it should be possible to avoid persistence specific models alltogether, > at least in many cases. what are good examples of actually needing > persistence specific models? This is ohh so true but it does apply more magic. On the other hand, we have passed the "too much magic" border long time ago, even with the new versions of both Doctrine and Symfony. So, why not? It's dependant on the orm/odm/manager if this is possible or not but I guess it can be done. Thomas. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en