• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate count a composite-id

Fernando Soto Martorell
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i try to make a count over a composite-id, i.e.:

it build the malformed sql: select count(distinct unidadadmi0_.uni_id, unidadadmi0_.emp_id) as col_0_0_ from public.tbl_unidad unidadadmi0_

the part of the composite-id of the mapping file is:

It's any way to configure this in the mapping file to avoid this problem?
Cause i'm using Hibernate Generic DAO and i catn't change the generated hql.

Thanks in advance.
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!