Closed rvanlaak closed 7 years ago
How about adding a SettingInterface
and allowing to specify the used implementation via config? Would this allow overriding the mapping?
But even if it does, I guess it wouldn't allow adding further mappings for e.g. ODM.
I'll work on a PR...
By which you mean a SettingsInterface
and AbstractSetting
class that implements that? Would that allow us to keep the Annotations
? They also are my preferred way of managing database mappings :+1:
If we'll be doing this, probably it is better to think about a way to allow multiple types of settings. By which I mean a combination of text
and textarea
settings. But, that probably means an extra field in the interface right?
By which you mean a
SettingsInterface
andAbstractSetting
class that implements that?
Yes.
Would that allow us to keep the
Annotations
?
I think so, I'm pretty sure I've also done that in one of my apps to override an attribute's mapping of a parent class.
They also are my preferred way of managing database mappings :+1:
Same here. But I still think it's cleaner to outsource the mapping to allow also ODM, like FOSUB does.
If we'll be doing this, probably it is better to think about a way to allow multiple types of settings. By which I mean a combination of
text
andtextarea
settings. But, that probably means an extra field in the interface right?
I don't want to add new types.
I don't want to add new types.
Know that, but I'd like to find an implementation where users can easily do that
As already discussed in #18 the
Setting
entity mapping is coded using annotations, which makes it impossible to override it. So what I'd like to propose is to move from Annotations to ayml
file so the entity mapping can be overridden in/app/Resources/CraueConfigBundle
. That way the bundle doesn't change, but allows others to fix this.