I've created a new Entity named Yamina and added to it annotation
Code:
@Entity
public class YaminaDistrict implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "cedtId")
private long id;
@Column(name = "yaminaDistrict")
private int numero;
@Column(name = "cetlf", length = 40, nullable = true)
private String libelleFr;
@Column(name = "cetla", length = 40, nullable = true)
private String libelleDe;
And I use it as property of a class like here :
Code:
@Entity
public class Commune implements Serializable {
...
@ManyToOne(fetch = FetchType.EAGER, optional = true)
@Cascade ((org.hibernate.annotations.CascadeType.SAVE_UPDATE))
private YaminaDistrict district;
}
I then configured my annotedSessionFactory to add it as annoted class
Code:
<property name="annotatedClasses">
<list>
<value>ch.btc.datec.yamina.model.ObjetDemande</value>
<value>ch.btc.datec.yamina.model.District</value>
<value>ch.btc.datec.yamina.model.YaminaDistrict</value>
...
but once I start the deployment of my application I got the following error :
Code:
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on ch.btc.datec.yamina.model.Commune.district references an unknown entity: ch.btc.datec.yamina.model .YaminaDistrict
Any idea what I've missed ?
Thanks in advance