[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2744) QueryException raised for valid SQL query - problems with aliases parsing
Michal Jastak (JIRA)
noreply at atlassian.com
Wed Jul 25 10:32:52 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27610 ]
Michal Jastak commented on HHH-2744:
------------------------------------
poor me, I was believing that if something is named SQL Query it will behave like SQL query ;) - not the HQL one, ok, thanks for you kind responses, we'll consider using the method suggested by you, or maybe just switch to simple JDBC.
> QueryException raised for valid SQL query - problems with aliases parsing
> -------------------------------------------------------------------------
>
> Key: HHH-2744
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2744
> Project: Hibernate3
> 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.
-
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