0

I'm working with Symfony2.0.12 and Doctrine2.1.6.

If you have a DB table "Address", two Symfony2 bundles "UserB" and "CompanyB", two DB tables "UserT" and "CompanyT", (each one with a foreign key referencing table "Address"),

what is the best way to handle this?

  • To arbitrarily insert the Address entity in UserB (or CompanyB) and to use only one Address.orm.yml?
  • To create another bundle AddressBundle
  • Something else?
Konerak
  • 39,272
  • 12
  • 98
  • 118
linuxatico
  • 1,878
  • 30
  • 43
  • in your case I would go with the solution presented here: http://stackoverflow.com/questions/10025278/symfony-2-bundles-am-i-using-them-right/10025644#10025644 – ilanco Apr 19 '12 at 09:36
  • Thanks, but I chose to create a HelperBundle that stores all metadatas and entities – linuxatico Apr 19 '12 at 13:46

0 Answers0