I am using hibernate as an ORMapper. I want to execute an actually pretty simple hql query:
SELECT a
FROM Foo a
WHERE a.status = :A0status
ORDER BY a.bookingTypeCode ASC,
a.priority ASC
This hql query is then converted to a sql query that looks something like this:
select a.*
from Foo a
where a.status='A'
order by a.bookingtypecode ASC,
a.priority ASC
When I execute sql in the oracle database using Oracle SQL Developer, I get 17 rows. However, when I execute the hql query (using the list of method Query, I get a list of 17 elements, which are all null. Although the number of elements is correct, none of the elements are loaded.
So I create and execute my request:
Query hQuery = hibSession.createQuery(hqlQuery);
for (Entry<String, Object> param : params.entrySet()) {
String key = param.getKey();
Object value = param.getValue();
hQuery.setParameter(key, value);
}
List<?> result = hQuery.list();

Does anyone know what could be the problem here?
Update 1
I recently upgraded from hibernate 3.2 to 4.3.5. Before the update, everything worked fine. After updating, I get this error.