T
T
thatside2015-05-13 22:12:47
symfony
thatside, 2015-05-13 22:12:47

Why in symfony2 do entities obtained via find($id) have null in all fields?

I get the entity via:

$this->getDoctrine()->getRepository(...)->find($id)

But such an entity has only the id itself in the filled fields, and the rest are null. What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
thatside, 2015-05-13
@thatside

The problem turned out to be different: when getting an entity in this way, we get not an object of its class, but an object of a proxy class. After performing all the necessary actions (saving as part of another model), everything was in place.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question