vorto icon indicating copy to clipboard operation
vorto copied to clipboard

Recursive definitions

Open e-grigorov opened this issue 7 years ago • 3 comments

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?

e-grigorov avatar Jun 15 '18 07:06 e-grigorov

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 avatar Jun 15 '18 08:06 Ebolon

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

aedelmann avatar Jun 15 '18 15:06 aedelmann

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

kolotu avatar Apr 14 '20 07:04 kolotu