iasql
iasql copied to clipboard
Saving data from cloud to DB never updates existing records for non-mapper entities
Two solutions:
- Each mapper that has a top-level entity with references to these objects in lower levels needs to have special logic in their
db.createanddb.updatemapper functions to identify these entities and check for duplicates themselves. Easier in the beginning, but scales poorly and prone to failure-by-omission - The TypeORM wrapper gains the ability to do this automatically, but requires a declarative way to disambiguate and identify amongst all entities, accelerating the plans to remove the
entityIdfunctions and restore some decorators, but needs to cover all situations the functions now cover.