That's the only problem that may arises... You can't reset strategies when you prepare otherwise this would remove user based strategies.

So if they are already set (from another object type for instance) but that its not used by the new type it will just be ignored. Otherwise if it already contained a user defined strategy and that a new one is set it will replace the old one.

I think it's not really a problem. I think we can assume that this is not really a problem. Furthermore the hydrator plugin manager was configured to not share objects by default. To be honest this maay be a problem if a user reuse the same hydrator for a lot of different instance types, where two types share an association with the same name.

We may be prefixing strategies by the class of the considered instance, too. That would be a (hacky) fix.

Envoyé de mon iPhone

Le 28 avr. 2013 à 00:49, Marco Pivetta <notifications@github.com> a écrit :

> In src/DoctrineModule/Stdlib/Hydrator/DoctrineObject.php:
> 
> >       * @return void
> >       */
> > -    protected function prepare()
> > +    protected function prepareStrategies()
> What happens to already set strategies?
> 
> —
> Reply to this email directly or view it on GitHub.