[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2744) QueryException raised for valid SQL query - problems with aliases parsing

Nikhil Ruikar (JIRA) noreply at atlassian.com
Mon Oct 10 08:38:19 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43980#comment-43980 ] 

Nikhil Ruikar commented on HHH-2744:
------------------------------------

Hi,Christian  I also came across same problem. Are there any other such characters which can not be used in hibernate query.

> QueryException raised for valid SQL query - problems with aliases parsing
> -------------------------------------------------------------------------
>
>                 Key: HHH-2744
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2744
>             Project: Hibernate Core
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>         Environment: Tomcat 5.5, Hibernate Annotations 3.3.0 ga
>            Reporter: Michal Jastak
>
> SQLQuery parser dose not parse queries correctly.
> Trying to invoke:
> session.createSQLQuery("select foo from bar where foo like '{%'");
> ends with:
> rg.hibernate.QueryException: Unmatched braces for alias path [select foo from bar where foo like '{%']
>     at org.hibernate.loader.custom.sql.SQLQueryParser.substituteBrackets(SQLQueryParser.java:74)
>     at org.hibernate.loader.custom.sql.SQLQueryParser.process(SQLQueryParser.java:51)
>     at org.hibernate.loader.custom.sql.SQLCustomQuery.<init>(SQLCustomQuery.java:110)
>     at org.hibernate.engine.query.NativeSQLQueryPlan.<init>(NativeSQLQueryPlan.java:43)
>     at org.hibernate.engine.query.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:114)
>     at org.hibernate.impl.AbstractSessionImpl.getNativeSQLQueryPlan(AbstractSessionImpl.java:137)
>     at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
>     at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list