jdaugherty opened a new issue, #116:
URL: https://github.com/apache/grails-intellij-plugin/issues/116

   Support feedback:
   
   I have found a bug in syntax check during the writing of domain model named 
query in Grails application.
   
   Let's consider we have got the following model:
   ```
   class Section {
     long projId
     hasMany = [
       requirements: Requirement
     ]
   }
   
   class Requirement {
     belongsTo = [ parent: Section ]
   
     namedQuery = {
       fetchByProjectId { projectId ->
         parent {
           eq 'projId', projectId
         }
       }
     }
   }
   ```
   Query `fetchByProjectId` fetches all requirements which belong to specified 
project and works fine, but IDEA says that current syntax is incorrect and 
provides the following message: 'parent' cannot be applied to 
'(groovy.lang.Closure)'.
   
   Note: if we try to move query to another side, so that entity which contains 
query has got 'hasMany' relation, than everything works fine. Syntax check 
fails only for 'belongsTo' relation.
   
   —
   OS: Windows 7
   JDK: JDK 1.6.0
   IDEA: 11.0
   Build: IU-117.798
   
   ---
   
   *Imported from [IDEA-91792](https://youtrack.jetbrains.com/issue/IDEA-91792) 
· Type: Bug · Votes: 1*
   *Comments, attachments, dates and reporter are not part of the export — 
follow the link above for the full history.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to