Le 31/01/2011 23:12, Thomas Rabaix a écrit :
Hello,

Sorry to come that late but the last decision, about the Application namespace removal, will be a failure [1]

A vendor published a bundle, now I need to extends a Model (not template neither a resource). For now they is no solution to do so.

- model association definition does not work with resource declaration, ie : BlogBundle:Post - for retrieving the class name we need to use the entity manager => this introduces a deep dependency
- how it is possible to access to constant ? or use a new constant ?

Symfony2 need a shared namespace for model definition. A bundle is not a black box, a bunble need to be easily extendable, for now this not work for model.

[1] https://github.com/symfony/symfony-sandbox/commit/fd9ed41a9b2c288fa455dcaee96a48bbbadb7314

Overriding the model of a bundle is not possible : the associations have to be defined with the fully qualified class name so you cannot override the target of an association. Associations are defined by Doctrine, not by Symfony so it is logical that the resource declaration does not work. It would make Doctrine depend to Symfony2 but it is not tied to Symfony2.

A shared namespace is not a solution either: this would mean that all model classes have to be in the same directory (quite difficult to share bundles this way) and that two bundles cannot define entities with the same name.

--
Christophe | Stof

--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to