Answer the question
In order to leave comments, you need to log in
How to essentially set the id to the field with the link instead of initializing the whole class?
The database is being migrated, and if each class is initialized, this will greatly affect the speed of the work. What are the possibilities of turning this code:
$user = $em->getRepository('AppBundle:User')->find($o['id_user']);
$offer = new Offer();
$offer->setUser($user);
$offer = new Offer();
$offer->setUser($o['id_user']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question