using parentheses for grouping is not supported
-----------------------------------------------

         Key: OCL-7
         URL: http://team.andromda.org:8080/jira/browse/OCL-7
     Project: OCL Translation
        Type: Bug
    Reporter: Wouter Zoons
 Assigned to: Chad Brandon 
    Priority: Critical


a simple example, suppose I want to find all the currently invalid medical 
certificates for a specific person:

(a certificate is invalid if the start and end dates are not before and after 
the given date respectively)

parameters: personId and date


the following OCL:

context 
MedicalCertificate::findInvalidByPerson(personId:Long,date:Date):Collection(MedicalCertificate)
 body findInvalidByPerson : allInstances->select(certificate | 
certificate.person.id = personId and (certificate.validityStart > date or 
certificate.validityEnd < date))

is translated into (invalid HQL!):

from MedicalCertificate as certificate where certificate.person.id = :personId 
certificate.validityStart > :date or certificate.validityEnd < :date

I expected the generated code to be:

from MedicalCertificate as certificate where certificate.person.id = :personId 
and (certificate.validityStart > :date or certificate.validityEnd < :date)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://team.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to