spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Modifying filtered DBs via DatabaseMapping #344

Open manuelma opened 5 months ago

manuelma commented 5 months ago

Say we apply a scenario filter over a DB that excludes some of the entities (because of entity_alternative definitions).

Then we add some of the filtered entities via a DatabaseMapping. The DatabaseMapping won't complain that the entities already exist because for all practical effects they are invisible to it. Then we commit, and we find a UNIQUE key violation.