Can please somebody give me hand and tell me how just to get the name of cat using Standard SQL queries in Hibernate ? My attempts always just return a SQLException
// this works
String sql = "select {cat.*} from cat {cat}";
Query sqlQuery = s.createSQLQuery(sql, "cat", Cat.class);
// this doesn't
String sql = "select cat.name as {cat.name} from cat {cat}";
Query sqlQuery = s.createSQLQuery(sql, "cat", Cat.class);
// the manual states: (?)
//Note: if you list each property explicitly, you must include all properties of the class and its subclasses!
Thanks, Dirk
|