Query object is fundamentally a wrapper around our SQL/HQL query. Also it has various methods to sustitute values inside the actual query we've written.
Check the methods which are available in the query object. It's not just session.createQuery("SQL_QUERY").list() you can do.
There are lot of jdbc specific functions available.
List on the other hand just fires the query and gives you a collection object.
If you are not laughing at yourself, then you just didn't get the joke.
posted 7 years ago
I was Getting error while error while iterating over the query or List why so.
Error: could not iterate query.
or some times it gives me hashcode while i used toString() while using List;