I'm doing an import module that bulk inserts 90000+ registers with symfony/doctrine. In order to insert each object I must read a field from other table. So, for each register I first obtain the relevant object from the other table, like this:
$this->doctrine->getRepository('table1')
put it in the new object I want to write, then write it, like this:
$em = $this->doctrine->getManager();
$em->merge($newObject);
$em->flush();
(I use merge because it's a general method to save both existing and new objects) But that takes too much time and the response timeouts even if i set apache for a long wait (which is not desirable). The Doctrine_Collection method doesn't work also. Anyone know a method to do this better so it return in a resonable amount of time ?
Thanks