[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-24 Thread Venzon
Thank you for all your replies My current multiple entity manager config looks like this atm: entity_managers: default: connection: conn1 db1: connection: conn1 mappings: HelloBundle: type: annotation

Re: [symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Christophe COEVOET
Le 20/01/2011 19:39, Venzon a écrit : I changed a bit my entity manager configuration: entity_managers: conn1: connection: conn1 mappings: HelloBundle: { type: annotation } conn2: connection: conn2 mappings:

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
small correction, seems that now (with current config) I can call every method I create, doesnt matter what is its name -- 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

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
I changed a bit my entity manager configuration: entity_managers: conn1: connection: conn1 mappings: HelloBundle: { type: annotation } conn2: connection: conn2 mappings: HelloBundle: { type: annotation,

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
I think I know why debuging is making me problems, I have noticed that some orm cache in always present in my apc cache and is used to map entities even when config.yml has been changed... -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.co

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
I did test and removed multiple entity managers leaving only one: doctrine.orm: mappings: HelloBundle: ~ I am still getting same error telling me: Class Application\HelloBundle\Repository\Test is not a valid entity or mapped super class. Maybe I lack some annotations or configuratio

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
@stof: My orm mapping config can be a problem indeed, I will try to work on it and will report back I really have hard time because I have to use multiple databases and that makes all config things hard, especialy when many aspects of SF2 are new to me :( -- If you want to report a vulnerability

Re: [symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread stof
On Thu, 20 Jan 2011 04:58:50 -0800 (PST), Venzon wrote: > What will be proper config solution when I have entities connecting > with several databases in same bundle? If you need to put sme entities in a database and some others in another database the proper configuration would be to separate th

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
What will be proper config solution when I have entities connecting with several databases in same bundle? -- 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 "symf

Re: [symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread stof
On Thu, 20 Jan 2011 04:40:04 -0800 (PST), Venzon wrote: > I am testing with mutiple db connections, my config.yml looks like > this: > > doctrine.orm: > auto_generate_proxy_classes: %kernel.debug% > auto_generate_hydrator_classes: true > auto_generate_proxy_classes: true > proxy_n

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
I am testing with mutiple db connections, my config.yml looks like this: doctrine.orm: auto_generate_proxy_classes: %kernel.debug% auto_generate_hydrator_classes: true auto_generate_proxy_classes: true proxy_namespace: Proxies proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies

Re: [symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread stof
On Thu, 20 Jan 2011 04:27:01 -0800 (PST), Venzon wrote: > When I use fully qualified class name $this- >>get('doctrine.orm.entity_manager')- >>>getRepository('Application\HelloBundle\Repository\Test') I get error: > Class Application\HelloBundle\Repository\Test is not a valid entity or > mapped su

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
When I use fully qualified class name $this- >get('doctrine.orm.entity_manager')- >>getRepository('Application\HelloBundle\Repository\Test') I get error: Class Application\HelloBundle\Repository\Test is not a valid entity or mapped super class. My repository class looks like this: http://groups.g

Re: [symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread stof
On Thu, 20 Jan 2011 04:09:24 -0800 (PST), Venzon wrote: > @stof: As you guys mentioned before; when I call entity repository > by: > $this->get('doctrine.orm.entity_manager')- >>getRepository('HelloBundle:Test') I retrieve default repository where > only magic finders are present, no custom ones.

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
@stof: As you guys mentioned before; when I call entity repository by: $this->get('doctrine.orm.entity_manager')- >getRepository('HelloBundle:Test') I retrieve default repository where only magic finders are present, no custom ones. How can I call then custom "Application\FtravelBundle\Repository\

Re: [symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread stof
On Thu, 20 Jan 2011 02:39:00 -0800 (PST), Venzon wrote: > Thank you for answer, I see now where is a difference. > > I have my custom repository for Test entity generated by framework > (using annotations) in /Application/HelloBundle/Repositories/Test.php > When I call it from controller by: $th

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-20 Thread Venzon
Thank you for answer, I see now where is a difference. I have my custom repository for Test entity generated by framework (using annotations) in /Application/HelloBundle/Repositories/Test.php When I call it from controller by: $this- >get('doctrine.orm.entity_manager')->getRepository("Application

[symfony-users] Re: SF2 custom get methods in entity repository class

2011-01-19 Thread Jérôme TEXIER
It's not a problem of location of the repository class but a problem of configuration. Your problem is that getRepository() is returning a default Doctrine \ORM\EntityRepository class (which only contains find, findBy, findAll) and not the custom one you created. You have to explicitly tell what i