Skip to main content



      Home
Home » Modeling » MoDisco » How to return multiple results for query on ecore model
How to return multiple results for query on ecore model [message #989651] Fri, 07 December 2012 03:16 Go to next message
Eclipse UserFriend
I have an ecore model and want to execute a ocl query on it that returns multiple results. The basic example I am using is
self.eClassifiers

where self is an EPackage.

I have specified EEList as the return type. But when I execute the query, I get the error message A EEList instance is expected as result. The result is: <toString() value of the actual result>

What do I need to specify as a return type or how do I need to modify the query to get all eClassifiers as the query result?

Thanks for help.
Re: How to return multiple results for query on ecore model [message #989677 is a reply to message #989651] Fri, 07 December 2012 04:49 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

If your MoDisco query is returning a list of elements, you should set it via the Lower Bound and Upper Bound fields of your query declaration (cf. the attached snapshot showing an OCL query example defined for Java models).
In any case, the Return Type should be the actual type of elements returned by the query.

Hugo
  • Attachment: Snapshot.jpg
    (Size: 52.86KB, Downloaded 343 times)
Re: How to return multiple results for query on ecore model [message #990169 is a reply to message #989677] Tue, 11 December 2012 04:09 Go to previous message
Eclipse UserFriend
Thanks. That works.
Previous Topic:edit generated java model
Next Topic:How to specifiy query parameters in the Query Executions view?
Goto Forum:
  


Current Time: Fri May 16 08:18:53 EDT 2025

Powered by FUDForum. Page generated in 0.31378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top