Forums Register Login

Problem with count() function and composed primary key

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Really good question.. I am actually passing for the same problem....

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


Fernando Crestani
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1082 times.
Similar Threads
Invalid composite primary key specification
Identity issue for EJB3.0 Entity along with Hibernate HBM configuration
JPA/Hibernate entity mapping error?
EJB3 : override column mapping
hibernate:many-to-many the association table is not getting populated
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:58:31.