AQL: Recursive selection [message #1801518] |
Mon, 21 January 2019 15:37 |
Laurens Lang Messages: 3 Registered: March 2018 |
Junior Member |
|
|
Hi,
I have an Item with can have properties, which also can have properties.
I tried to get them in an elegant way recursively, but it does not work, but i don't want to use a service, since i will need this scenario quite often. It seems i overlooked a concept.
NAIVE Approach:
aql: self.properties + self.properties.subProperties + self.properties.subProperties.subProperties + self.properties.subProperties.subProperties.subProperties ....
How can i implement this?
Thanks,
Laurens
[Updated on: Wed, 23 January 2019 15:31] Report message to a moderator
|
|
|
Re: AQL: Recursive selection [message #1801679 is a reply to message #1801518] |
Thu, 24 January 2019 16:32 |
|
Hello Laurens,
Why don't you want to use a Java service?
In which case do you want to do it? Is it in a mapping definition?
Maybe the solution is provided by Sirius and not by AQL. So, to give you the best answer, I need to know your need and in which case Sirius you should use this.
Thanks.
Regards,
|
|
|
|
Re: AQL: Recursive selection [message #1801937 is a reply to message #1801931] |
Tue, 29 January 2019 16:02 |
|
Hello,
I think that in your metaclass, you should add an EOperation getAllProperties. In its implementation you have a recursive method that look for properties, sub-properties etc. This way in your odesign, you will just need to call "aql: self.getAllProperties".
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03053 seconds