Answer the question
In order to leave comments, you need to log in
How in symfony / doctrine for an entity that does not come from the database, build a relation?
I have an entity.
The data for this entity is not retrieved from the database, but is retrieved by a GET request from a third-party service.
Comments and some other data are stored for this entity, but they are already stored on my server in MySQL.
What I want to do:
Pulled data (JSON) from the service, mapped it to an object inside the application.
And using the "getReviews()" method to call lazy loading to the application database.
How to properly organize this in the concept of doctrine?
Answer the question
In order to leave comments, you need to log in
Comments and some other data are stored for this entity , but they are already stored on my server in MySQL.
What you are talking about is not an entity, it is POPO (Plain Old PHP Object).
Please describe the problem in more detail. What will happen to this object next? And with the objects connected with it (reviews)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question