M
M
miy2016-08-29 17:02:33
symfony
miy, 2016-08-29 17:02:33

Where should entity be mapped?

For example, there is a service that saves a new user. The service accepts DTO, is it right to transfer this DTO to some kind of mapper, which will already return a doctrine entity with all the data, and we already give this entity to the repository?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andriyan0v, 2016-09-08
@andriyan0v

Yes, you can transform dto -> entity in your service, or in a separate transformer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question