E
E
Evgeny Popov2015-11-07 08:33:43
Doctrine ORM
Evgeny Popov, 2015-11-07 08:33:43

How to make a request from one service to another and create an app-platform(doctrine) object?

There is a class with getters and setters for the current unmapped table.
There is a reception of parameters not from this table.
When executing a request to the api method of table A, it is necessary to find data in table B by input parameters and if there is an object that meets the criteria, then return its id, which is already used when creating an object in table A.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-11-07
@Kaaboeld

Stop using "tables" and "records" and use "objects".
Doctrine professes the principle of persistence ignorance. That is, it gives you a certain level of isolation from the data store.
You have repositories, you have entities. Try to describe what you want to do using these terms, though doctrine entities are just PHP objects, nothing special.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question