• Post Reply Bookmark Topic Watch Topic
  • New Topic

org.hibernate.AnnotationException  RSS feed

 
Alejandro Barrero
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am following a tutorial of Hibernate with Spring. I am trying to add a User object to the database. I am getting the following error: "org.hibernate.AnnotationException: Unknown mappedBy in:  com.infiniteskills.data.entities.User.credential, referenced property unknown: com.infiniteskills.data.entities.Credential.user
"
These are my classes


This is pom.xml
 
Alejandro Barrero
Ranch Hand
Posts: 371
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All classes must be set in the configuration.

I was missing: "configuration.addAnnotatedClass(Transaction.class);".
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!