Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:16 Go to next message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
Member
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 09:49 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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 313 times)


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: How to return multiple results for query on ecore model [message #990169 is a reply to message #989677] Tue, 11 December 2012 09:09 Go to previous message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
Member
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: Thu Apr 25 12:45:40 GMT 2024

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

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

Back to the top