N
N
Nicholas Lindemann2015-03-06 15:25:26
symfony
Nicholas Lindemann, 2015-03-06 15:25:26

How heavily should the entity be filled with properties?

Hello everyone, I asked myself such an important question for me. The fact is that I am developing functionality on Symfony - a user management manager, something like FOSUserBundle (I don’t use a ready-made package, because then I won’t know how it works, all the more what a thrill from such a development). There is a User entity based on DoctrineORM, which actually stores all information about the user. The essence of my question is that over time there can be too much information (properties in the User class / entity) about the user, and is it worth putting all this into one entity?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Evgenievich, 2015-03-06
@banderos120

In the entity itself, put only information that affects authorization and roles. Place other information in the Profile entity and link one to one. If there are many properties (fields), then there is already a question for designing a database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question