Sync in data_model show misleading warnings
Currently, running the model.sync_data_model(noquestion=True)
function from data_model twice on the same yml file (assuming an empty database leads to e.g. the following output:
## Difference between the old and the new version of Simulation
property responsible differs:
old version: {'datatype': None}
new version: {'datatype': 'LIST<Person>'}
property date differs:
old version: {'datatype': None}
new version: {'datatype': 'DATETIME'}
property identifier differs:
old version: {'datatype': None}
new version: {'datatype': 'TEXT'}
So, there is a difference reported, that cannot exist. Probably due to information that was not downloaded by the client before the comparison.
You can use the following yaml to reproduce:
Simulation:
obligatory_properties:
date:
datatype: DATETIME
description: 'date of the simulation'
identifier:
datatype: TEXT
description: 'identifier of the simulation'
responsible:
datatype: LIST<Person>
Probably the xml of the retrieved properties of the record types do not contain the datatype attributes and need to be retrieved explicitly before the comparison.