]
Steve Ebersole closed HHH-919.
------------------------------
Closing stale resolved issues
Error converting to int when uses "extract day" function
--------------------------------------------------------
Key: HHH-919
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-919
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.1 beta 2
Environment: Hibernate 3.05 and 3.1 beta 2.
Firebird 1.5.2
Reporter: Leandro Sinhorini Alves
I need a sql that returns the first day of a month. I wrote the follow HQL:
select ccb.data - day(ccb.data) + 1 from CompraCombustivel ccb
The translation is perfect and SQL is executed by Firebird with no error. But when I try
to get the result:
ScrollableResults sr = query.scroll();
while ( sr.next() ) {
...
the program throws:
22:05:13,984 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 07006
22:05:13,984 ERROR [JDBCExceptionReporter] Error converting to int.
java.lang.RuntimeException: org.hibernate.exception.SQLGrammarException: could not read
next row of results
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: