I have an sql query as follows:
List employees = getCurrentSession()
.createSQLQuery(
\"select\"
For a simpler solution, double-quote the identifier in the query as sent to the server. Instead of
e.first_name as firstName
it should read
e.first_name as "firstName"
In PostgreSQL, double-quoting an identifier forces case-sensitivity. Unquoted, it (mostly) follows the SQL standard and folds to a single case (albeit lower case where the standard is upper case).