It looks like when you clear entities on Postgres some references are lost and tags are not saved :-/
// flush every 20 entries
if (($i % 20) === 0) {
$this->em->flush();
-
- // clear only affected entities
- $this->em->clear(Entry::class);
- $this->em->clear(Tag::class);
}
++$i;
}
$this->em->flush();
+ $this->em->clear();
}
}
// flush every 20 entries
if (($i % 20) === 0) {
$this->em->flush();
-
- // clear only affected entities
- $this->em->clear(Entry::class);
- $this->em->clear(Tag::class);
}
++$i;
}
$this->em->flush();
+ $this->em->clear();
}
}
// flush every 20 entries
if (($i % 20) === 0) {
$this->em->flush();
-
- // clear only affected entities
- $this->em->clear(Entry::class);
- $this->em->clear(Tag::class);
}
++$i;
}
$this->em->flush();
+ $this->em->clear();
}
/**