Answer the question
In order to leave comments, you need to log in
What distinguishes the entity called by Doctrine (by the find method) from the one we created ourselves?
I wrote a script for transferring users from the old database, it looks like this:
$user = new User();
$user
->setId($u['id'])
->setEmail($u['user_email'])
->setUsername($u['login'])
;
$em->persist($user);
$metadata = $em->getClassMetaData(get_class($user));
$metadata->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_NONE);
$em->flush();
find()
; but I would like to make sure that the Doctrine + Symfony bundle does not have anything in store for such a case. After all, we use the same method $em->persist(...);
to update the record. $em->flush();
call not after each $em->persist(...);
, but, for example, every 30, how much will the transfer speed change?
Answer the question
In order to leave comments, you need to log in
After all, the same $em->persist(...); we use and to update the record.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question