Hi,
I'm using hibernate (3.3) to work against a legacy schema.
I am running sql queries like this, for example:
Code:
Query query = getSession().createSQLQuery(
"select st.description \"The Description\", st.value \"The Value\" " +
"from some_table st");
List list = query.list();
Don't ask why (this is a legacy schema), but I can't create an hibernate entity for the expected result, so the list I get contains Objects with 2 nameless properties.
My question is: how can I get the property names, a.k.a the aliases ("The Description" and "The Value")? With JDBC I could just dig it from the resultset/statement...
Is there an easy way to do that in hibernate?
Your help is much appreciated