Fixes #6316
Fixes #5735 (not directly, but think it should be resolved now)
When an archive was imported into an SqliteDosStorage backend an exception was raised by sqlalchemy. It was treating the uuid column of the models as a UUID type but in reality it was a string. This is because the storage plugin inherits the implementation largely from the core.psql_dos plugin, but it converts the models, since the UUID types that are used by the PostgreSQL implementation are not supported by SQLite.
The problem was that for archive importing, the bulk_insert method was used, which calls the _get_mapper_from_entity method to map a given ORM entity to the corresponding database model. But since this method was inherited from core.psql_dos, it was returning the incorrect models. The problem is fixed by overriding it in SqliteDosStorage and returning the SQLite-adapted models.
Fixes #6316 Fixes #5735 (not directly, but think it should be resolved now)
When an archive was imported into an
SqliteDosStorage
backend an exception was raised by sqlalchemy. It was treating theuuid
column of the models as a UUID type but in reality it was a string. This is because the storage plugin inherits the implementation largely from thecore.psql_dos
plugin, but it converts the models, since the UUID types that are used by the PostgreSQL implementation are not supported by SQLite.The problem was that for archive importing, the
bulk_insert
method was used, which calls the_get_mapper_from_entity
method to map a given ORM entity to the corresponding database model. But since this method was inherited fromcore.psql_dos
, it was returning the incorrect models. The problem is fixed by overriding it inSqliteDosStorage
and returning the SQLite-adapted models.