Azure / opendigitaltwins-dtdl

Digital Twins Definition Language
Creative Commons Attribution 4.0 International
466 stars 160 forks source link

Relationship maxMultiplicity ignored #120

Closed packnologyusa closed 2 years ago

packnologyusa commented 2 years ago

Sorry, I'm not sure if this is the correct forum for this, but I have a question about the expected behavior of the DTDL Relationship -> maxMultiplicity configuration. I have defined a Relationship on a Model that specifies maxMultiplicity = 1. I was able to add a 2nd relationship of the same type to the same digital twin in Azure Digital Twins. I was expecting an error to be raised when I attempted to add the 2nd relationship, and for the integrity to be maintained. If someone could confirm that this is unexpected behavior, I will raise a bug report with Microsoft Azure.

briancr-ms commented 2 years ago

Yes, maxMultiplicity is meant to state the maximum number of relationships that can be created. Creating a bug report for Azure Digital Twins will be helpful.

packnologyusa commented 2 years ago

Hi @briancr-ms I raised a ticket with Microsoft and they confirmed that Azure Digital Twins does not enforce the maxMultiplicity constraint in DTDL2, and apparently they don't have any plans to at this stage. Here is the response from the ADT product team:

"Thank you for bringing this to our attention. We apologize for the inconvenience caused due to the incorrect documentation. ADT does not currently enforce multiplicity values set in the model. We will update the documentation to reflect the current state. We will definitely evaluate adding this functionality. We currently don't have an ETA since it will be a breaking change for our customers"