Le 01/02/2011 00:39, Thomas Rabaix a écrit :
On 1 févr. 2011, at 00:18, Christophe COEVOET wrote:
this will not solve the issue.
How ? can you elaborate ?
How will you define the associations ? Relying on the end-user or
providing the mapping for non-existant class in the bundle ? The first
case is a broken case and the second one seems ugly.
Thus, overriding the mapping is not possible so you will not be able to
replace the mapping provided by the bundle. What would you suggest ?
Relying on the end-user for the whole mapping ?
This implies that all bundles defines their model by targetting an extending
class which does not exist in the bundle. Most of the time, users will want to
use the classes provided by the bundle. So this seems to add much more
complexity for both the bundle developpers and the bundle users.
I don't see complexity here.
Your solution implies that *all* bundle developpers build their model
with mapped superclasses and rely on the end user to create all the
needed entities, mapping them with the correct associations as they
cannot be mapped in the mapped superclasses. And then they will have to
use inexistant classes in their bundle as they have to use the entity,
not the mapped superclass.
Thus it implies that *all* end-users will have to create the entities
for each third-party bundle they use.
This is additionnal complexity.
Thus, extending the model will also mean extending the business logic to
handle the extra fields. If you need to extend all entities and the
business logic, what is the point of using third-party code ? As soon as
your extra fields are not optionnal, it will break all the bundle logic
by throwing exceptions when persisting the datas.
--
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