Bonjour,
j'essaie de lier 2 tables grace à @onetomany et @manytoone. J'ai le code suivant :
Dans le fichier Declaration.java :
Dans le fichier Qualification.java :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
J'obtient l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor' defined in ServletContext resource [/WEB-INF/injectionSpringTransactionDB.jonas.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEntityManagerFactory' defined in ServletContext resource [/WEB-INF/injectionSpringTransactionDB.jonas.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: ft.proto.v2.persistance.bean.declaration.Declaration.qualifications[ft.proto.v2.persistance.bean.declaration.Qualification]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEntityManagerFactory' defined in ServletContext resource [/WEB-INF/injectionSpringTransactionDB.jonas.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: ft.proto.v2.persistance.bean.declaration.Declaration.qualifications[ft.proto.v2.persistance.bean.declaration.Qualification]
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: ft.proto.v2.persistance.bean.declaration.Declaration.qualifications[ft.proto.v2.persistance.bean.declaration.Qualification]
Merci d'avance pour votre aide

 

 
		
		 
         
 

 
			
			


 
   


 problème de liaison de tables
 problème de liaison de tables
				 Répondre avec citation
  Répondre avec citation
Partager