Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

@OneToOne or @ManyToOne on references an unknown entity

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple scenario:

   1.an AdmisRejet can be linked to a Admis or a PreCandidat.
   2.Admis and PreCandidat can have many AdmisRejet.

All was working when I only had Admis and AdmisRejet.

But then I add PreCandidat (the same way as Admis), I get an hibernate error.

Can't find out why...

Model (they all have getters and setters and ids):





Error:

   Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on nc.unc.importparcoursup.dao.admisDAO.AdmisRejet.preCandidatRejet references an unknown entity: nc.unc.importparcoursup.dao.pgiCocktailDAO.entity.PreCandidat
 
Creator of Enthuware JWS+ V6
Posts: 3412
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you listed all entities in the persistence.xml?

If so, then you should add PreCandidat there as well.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic