[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3081?page=c...
]
Raphael Flores commented on HHH-3081:
-------------------------------------
Hi, does such feature would be complex to add?
I don't know what it implies, but it would be great if we could get an Iterator on SQL
queries when an entity is supplied.
Sometimes SQL seems to be the only/best way to get data when queries are complex (ie. when
haing to use date/timestamp operations).
SQL queries do not currently support iteration
----------------------------------------------
Key: HHH-3081
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3081
Project: Hibernate Core
Issue Type: Bug
Reporter: MG
Query sqlQuery = session.createSQLQuery("select * from
TRADE").addEntity(Trade.class);
sqlQuery.setReadOnly(true);
sqlQuery.setCacheMode(CacheMode.IGNORE);
sqlQuery.setCacheable(false);
sqlQuery.setFetchSize(1000);
Iterator<Trade> trades = sqlQuery.iterate();
Causes
Exception in thread "main" java.lang.UnsupportedOperationException: SQL queries
do not currently support iteration
at org.hibernate.impl.SQLQueryImpl.iterate(SQLQueryImpl.java:190)
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira