Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate key mapping for GROUP BY

 
Margaret Schwab
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When using 'createSQLQuery', do you still need the hbm mapping file?

I am struggling with
SELECT trunc(some_date), some_field
FROM some_table
GROUP BY trunc(some_date), some_field
ORDER BY trunc(some_date), some_field

What should the hbm file look like, in particular - how to define the ID?

A key (ID) on some_date does not work (wrong column name Oracle error), nor does a composite-id on (some_date and some_field)

Thanks so much!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic