Hello,
while working with the Environment/AirQualityObserved model I've noticed that the refDevice property from the model isn't included in the generated SQL schema migration file.
refDevice uses anyOf - https://github.com/smart-data-models/dataModel.Environment/blob/a363c2bccf5ea3118fb82526372573021ebe1256/AirQualityObserved/model.yaml#L436 - which doesn't seem to yet be supported by the python script which is used to generate the SQL files - https://github.com/smart-data-models/data-models/blob/master/pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py#L1131
There's support for allOf and oneOf but not anyOf.
I propose that support for anyOf is added to the SQL code generator and SQL schema files are regenerated.
These kind of missing columns make some of the SQL schema files unusable without patches because they're missing relationship columns which means that we can't perform joins with different Smart Data Model tables such as a join between AirQualityObserved and Device through refDevice in our case.
Thank you 🙂
Hello,
while working with the
Environment/AirQualityObservedmodel I've noticed that therefDeviceproperty from the model isn't included in the generated SQL schema migration file.refDeviceusesanyOf- https://github.com/smart-data-models/dataModel.Environment/blob/a363c2bccf5ea3118fb82526372573021ebe1256/AirQualityObserved/model.yaml#L436 - which doesn't seem to yet be supported by the python script which is used to generate the SQL files - https://github.com/smart-data-models/data-models/blob/master/pysmartdatamodels/pysmartdatamodels/pysmartdatamodels.py#L1131There's support for
allOfandoneOfbut notanyOf.I propose that support for
anyOfis added to the SQL code generator and SQL schema files are regenerated.These kind of missing columns make some of the SQL schema files unusable without patches because they're missing relationship columns which means that we can't perform joins with different Smart Data Model tables such as a join between
AirQualityObservedandDevicethroughrefDevicein our case.Thank you 🙂