[CDO] OCL Query Syntax, Package reference [message #990869] |
Fri, 14 December 2012 10:26  |
Eclipse User |
|
|
|
Hello,
I am trying to execute this in OCL:
Value.allInstances()->select(v:Value|v.belongsTo=self)
I get an exception:
Caused by: org.eclipse.ocl.SemanticException: Unrecognized variable: (Value)
at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:352)
It seems, as EPackage information is missing, how do I specify it in the query?
thank you, Christophe
|
|
|
|
|
|
|
|
|
|
|
Re: [CDO] OCL Query Syntax, Package reference [message #990962 is a reply to message #990960] |
Sat, 15 December 2012 08:12  |
Eclipse User |
|
|
|
Hi
Yes, it needs the appropriate CDO server-side enable abioyt which I know
nothing.
Of couese anything that directly or indirectly uses allInstances() may
have very poor performance.
It is often easy to relocate constraints from some global truth
statement about all class Xes to a much simpler invariant on (each)
class X. One day an OCL optimizing code generator might do this
automatically.
Regards
Ed Willink
On 15/12/2012 12:43, Christophe Bouhier wrote:
> Thanks for the pointer on hidden-Opposite. This would need to be
> enabled in the OCL Query Handler for CDO, it seems?
> rgds Christophe
|
|
|
Powered by
FUDForum. Page generated in 0.06409 seconds