1
1
111ilya1112019-07-14 15:53:41
symfony
111ilya111, 2019-07-14 15:53:41

Symfony how to properly store multiple property?

Hello, how to store multiple properties correctly?
For example, a user can have 2 phones (optional property).
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Flying, 2019-07-14
@111ilya111

In general, if you do not need to access these elements separately at the database level (i.e. you do not need, for example, to select only one of the phones in the query), then you can use an array and use the arrayor type json_arrayfor mapping. For a complete list of types, see the Doctrine documentation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question