[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-669) Code level HQL query validation

radhakrishna (JIRA) noreply at atlassian.com
Thu Apr 16 11:10:23 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32904#action_32904 ] 

radhakrishna commented on HBX-669:
----------------------------------

Here is when it works and when it does not:

createQuery(''hql query") seems to be working ONLY as long as the hql query falls in the same line as in the following case, I am accessing an invalid field nonExistingField rather without a getter method from SomeObj class.

createQuery("from SomeObj someObj where someObj.nonExistingField is null"); // throws errors

createQuery("from SomeObj someObj where " +
"someObj.nonExistingField is null"); // DOES NOT throw errors

so when the query goes into the second line, which is true in most of the cases, it does not show errors.

The same issue applies when using the hql autocompleter, using ctrl + space.

Help please!


> Code level HQL query validation
> -------------------------------
>
>                 Key: HBX-669
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-669
>             Project: Hibernate Tools
>          Issue Type: New Feature
>          Components: eclipse
>            Reporter: Emmanuel Bernard
>             Fix For: 3.2beta9
>
>
> When an Hibernate configuration is provided, the IDE should be able to validate a given HQL query written in the code and in the XML files
> The code level warning would be a killer feature.
> Note that the hard part for the code is to "reckognize" a string as HQL query.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list