Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

@OneToOne or @ManyToOne on references an unknown entity

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple scenario: 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):


   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: 3348
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you listed all entities in the persistence.xml?

If so, then you should add PreCandidat there as well.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic