• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with count() function and composed primary key

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well guys, I have encountered a problem using composed primary key with JPA and Hibernate and I hope to find some help in here.

When I execute the following query:


The hibernate is creating the following SQL:


After the execution, I am getting the following JDBC Exception to Oracle:


As we can see, the SQL that hibernate has created is using 2 parameters on the count() function. I think the problem is it. The question is, Am I doing something wrong, or it is a bug?
The compose key object and the entity are following:



Thank you.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Really good question.. I am actually passing for the same problem....

Hope we have an answer or explanition for this...


Fernando Crestani
 
reply
    Bookmark Topic Watch Topic
  • New Topic