Reputation: 1835
I'm using Spring 3 with Hibernate 3 and getting this error:
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: cz.dagoo.dros.models.Invoice.invoiceItems[cz.dagoo.dros.models.InvoiceItem]
I've tried everything what I found but I'm not able to solve this problem.
How is it possible that some class is unmapped?
Invoice class:
InvoiceItem class:
Hibernate.xml:
BeanLocations.xml:
My project files:
Upvotes: 1
Views: 801
Reputation: 18552
As the exception tells you: cz.dagoo.dros.models.InvoiceItem
is not mapped as an entity. To solve this issue you should add the missing @Entity
-annotation on InvoiceItem.
Upvotes: 1