On Friday, 7 February 2014 08:30:24 UTC+1, Parsifal wrote: > > As about recommendation in second part I highly appreciate them and will > do so from now on > You should start with them first, refactoring your model, before working further on it. Otherwise it will always stay messy and unclear. On Friday, 7 February 2014 08:30:24 UTC+1, Parsifal wrote:
> but as about first part: No, I need OneToMany from Modules to > ModulesConfig and the constructor also is in Modules. If so, then how the > variables and constructor should be? > OK, say you rename your Modules-entity to Module. Then you have two entity-classes: Module and ModuleConfig. Now, to get no confusion, which of those two do you want: - In a Module-entity you can have multiple ModuleConfig-entities and every ModuleConfig-entity only has 1 Module. In this case you'll have a $moduleConfigs collection in a Module on which a OneToMany-relationship is defined. In a ModuleConfig you then have a $module defined with a ManyToOne relation. - Or: in a Module-entity you can only have 1 ModuleConfig-entity, but a ModuleConfig-entity can be associated with multiple Module-entities. In that case you'll have a $moduleConfig propery in a Module on which a ManyToOne-relationship is defined. In a ModuleConfig you then have a $modules collection defined with a OneToMany relation. -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/groups/opt_out.
