This topic was posted previously on 11-Feb-2005.
Allegedly, this was fixed; see:
http://opensource.atlassian.com/project ... se/HB-1042
However, neither \: nor :: work in a SQL query such as:
Code:
String sql = "select cat.originalId as {cat.id}, " +
"cat.mateid as {cat.mate}, cat.sex as {cat.sex}, " +
"cat.weight*10 as {cat.weight}, cat.name as {cat.name} " +
"'2005-6-28 13:54:12' AS {cat.date}" +
"from cat_log cat where {cat.mate} = :catId"
Perhaps, Gavin King, who wrote in the link referenced above:
Quote:
This is fixed by new query parser in HB3. We wont fix in the old parser, since it is being end-of-lifed. Workaround is to use a parameter instead of a literal.
would enlighten us on how to do this.
Thanks,
Brian Cox
Hibernate version: 3.0
Mapping documents:Code between sessionFactory.openSession() and session.close():Full stack trace of any exception that occurs:Name and version of the database you are using:The generated SQL (show_sql=true):Debug level Hibernate log excerpt:[/quote]