Annotations being deleted with csv import

Has anyone experienced their annotations being deleted when they import via the csv import module? Omeka S is up to date. I do get this error, but I am not sure it is related:

Doctrine\ORM\ORMInvalidArgumentException: A new entity was found through the relationship ‘Omeka\Entity\Resource#resourceTemplate’ that was not configured to cascade persist operations for entity: DoctrineProxies_CG_\Omeka\Entity\ResourceTemplate@00000000000004d10000000000000000. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(…,cascade={“persist”}). If you cannot find out which entity causes the problem implement ‘Omeka\Entity\ResourceTemplate#__toString()’ to get a clue. in /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:114
Stack trace:
#0 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(3474): Doctrine\ORM\ORMInvalidArgumentException::newEntitiesFoundThroughRelationships()
#1 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(385): Doctrine\ORM\UnitOfWork->assertThatThereAreNoUnintentionallyNonPersistedAssociations()
#2 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(376): Doctrine\ORM\UnitOfWork->commit()
#3 /var/www/html/application/src/Api/Adapter/AbstractEntityAdapter.php(442): Doctrine\ORM\EntityManager->flush()
#4 /var/www/html/application/src/Api/Manager.php(233): Omeka\Api\Adapter\AbstractEntityAdapter->update()
#5 /var/www/html/application/src/Api/Manager.php(136): Omeka\Api\Manager->execute()
#6 /var/www/html/modules/CSVImport/src/Job/Import.php(1206): Omeka\Api\Manager->update()
#7 /var/www/html/modules/CSVImport/src/Job/Import.php(203): CSVImport\Job\Import->endJob()
#8 /var/www/html/application/src/Job/DispatchStrategy/Synchronous.php(34): CSVImport\Job\Import->perform()
#9 /var/www/html/modules/Log/src/Job/Dispatcher.php(32): Omeka\Job\DispatchStrategy\Synchronous->send()
#10 /var/www/html/application/data/scripts/perform-job.php(66): Log\Job\Dispatcher->send()
#11 {main}

Just so we’re clear, you’re saying that value annotations are getting removed when you do an “update” import, right? And if it is, could you share what kind of update you’re doing (“append,” “revise,” etc.)

Yes, that’s correct. It is an “append” update.

CSV Import 2.3.2 should resolve this problem.

Yes, it works! Thanks very much.

I am experiencing a similar issue with mapping now (after updating to CSV Import 2.3.2). When I append data via CSV import, the latitude and longitude are deleted.

1 Like

Sorry you’re having another similar issue, thanks for letting us know.

It looks like this is an issue with the Mapping module and how it integrates with the CSV Import module. We’re looking into a fix.