On 28.12.2010, at 19:48, Gustavo Adrian wrote: > Hi all, > > Suppose I have a AccountBundle with an entity "Account" with the following > properties: > > . internalCode > . companyName > . address > > > Now, suppose I create another bundle, ContactBundle, that depends on the > AccountBundle, having an entity "Contact" with the following properties: > > . account > . fullName > . email > . fax > . telephone > > > > I want that the ContactBundle have a dependency on AccountBundle. Is there a > way of doing this, or is there an implementation planned in this regard? > > Another thing I'd want to know is the following. Maybe the example that I > give you here is not the ideal but I think you'll know what I mean. If I want > to use AccountBundle alone, the properties defined here are ok, but.. if I > have the ContactBundle "activated" I'd want to have another property on the > Account entity: > > . contacts > > Obviusly, this would need a relation configured between the Account entity > and the Contact one. But this property would exist ONLY if the ContactBundle > is available. If not, this property shouldn't exist. > > > Which would be the better way of handle this use case, if any? I use > annotations. Maybe with XML / YML is the solution?
Well we had this topic before with basically the comment that there is no need. Let me explain, there shouldnt be a hard dependency between any Bundle, at most on interfaces. Due to the DIC there is no reason why someone couldnt implement an alternative Bundle to go along either your Contact or Account Bundle. So imho its all essentially a documentation thing. regards, Lukas Kahwe Smith [email protected] -- 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
