Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cardinality on a relationship between two classes #1

Open
elsdvlee opened this issue Nov 4, 2021 · 1 comment
Open

Cardinality on a relationship between two classes #1

elsdvlee opened this issue Nov 4, 2021 · 1 comment

Comments

@elsdvlee
Copy link

elsdvlee commented Nov 4, 2021

How can one indicated the cardinality of a ObjectProperty if we have 2 ObjectProperties for the same class expecting the same class.

Example: suppose that I want to state that always 1 fromLocation is needed, and always 2 toLocations are needed

AS IS

class LocationToLocation {
string[] replenishmentMethods sc:replenishmentMethod 1..*
SupplierLocation locationFrom schema:fromLocation
SupplierLocation locationTo schema:toLocation
}

LocationToLocation -- "1" SupplierLocation

both locationFrom and LocationTo need to hove the same cardinality. Adding LocationToLocation -- "2" SupplierLocation doesn't work and wouldn't be clear

WANTED

class LocationToLocation {
string[] replenishmentMethods sc:replenishmentMethod 1..*
SupplierLocation locationFrom schema:fromLocation 1
SupplierLocation locationTo schema:toLocation 2
}

LocationToLocation -- SupplierLocation

In general I believe that it would also be more clear if the cardinality on DataTypeProperties and ObjectProperties are indicated in the same way. Is there a specific reason why this is not the chosen approach in the present implementation?

@pheyvaer
Copy link
Contributor

pheyvaer commented Nov 4, 2021

Hi @elsdvlee

Yeah indeed that is not supported at the moment. The suggestion that you made is indeed a good solution for this.

In general I believe that it would also be more clear if the cardinality on DataTypeProperties and ObjectProperties are indicated in the same way. Is there a specific reason why this is not the chosen approach in the present implementation?

I did it this way because I didn't want to alter the default behaviour of Mermaid if need really needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants