doctrine2 - How should Symfony projects implement UML2 class interfaces in its entity classes? -
after reading around how build uml class diagrams , using solid principles, i've tried putting uml class diagram i'm happy new symfony project i'm going start.
however, interfaces i've defined - example:
i'm unclear if/how should implemented symfony abstract entities. i've read there seems conflicting opinions:
symfony docs: how define relationships abstract classes , interfaces , seems when accessing abstract classes other bundles?
questions such this people advise against using abstract classes , isntead create 'normal' entities (ie professor , student) - although isn't disregarding benefits of solid?
you should @ inheritance mapping section of doctrine documentation... allows have abstract "person" class , extend make "student" or "teacher" there couple of different ways can pull off... simplest of single_table
inheritance, uses "discriminator" in database know type of entity is.
Comments
Post a Comment