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

Recursive definitions #964

Open
e-grigorov opened this issue Jun 15, 2018 · 3 comments
Open

Recursive definitions #964

e-grigorov opened this issue Jun 15, 2018 · 3 comments

Comments

@e-grigorov
Copy link
Contributor

I am trying to define a model similar to:

entity Exception {
	optional cause as Exception
}

Currently, it fails with: Object property type has circular reference

What is the best way to model this?

@Ebolon
Copy link
Contributor

Ebolon commented Jun 15, 2018

Form my point of view nested objects with a self-reference should be possible.

Here an example with an additional property for a better understanding:

entity Exception {
	optional cause as Exception
        mandatory message as string
}

I would suggest to remove the checkCircularRefInObjectPropertyType check in Datatype.

@aedelmann any objections?

Ebolon added a commit to Ebolon/vorto that referenced this issue Jun 15, 2018
…for datatype property recursion and same name validation for function block operation name

Signed-off-by: Simon Pizonka <[email protected]>
@aedelmann
Copy link
Contributor

All Current generators need to handle this recursion if this validation check gets removed.
Also the vorto perspective needs to handle that as well

@kolotu
Copy link
Contributor

kolotu commented Apr 14, 2020

Recursive definitions can only apply to entities, since Functionblocks and Information Models can not self-reference.

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

No branches or pull requests

4 participants