• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Composite primary key-Exception:could not resolve property

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is that I split my manytomany relations into two onetomany relations, but when I query datas using Criteria, the code throws Exceptions that could not resolve property. Here is my code:

My PK class is :









and then, I wrote an criteria query test:


but when I query data like this, it works:



when I use the junit to test the testAccidentRole() method, I encountered the following exception:


This problem really made me crazy and I tried to solve that for a long time. Could someone help me out? Thanks a lot.

 
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mapping of roleid property to database column is missing in AccidentRole entity.
 
hr rick
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My roleid property is in my Role class.
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The roleid property is not mapped to table column in Role entity.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!