| Author |
mappedBy reference an unknown target entity property:
|
francesco Ierna
Greenhorn
Joined: Mar 20, 2011
Posts: 14
|
|
Hi!
i have a problem about :
mappedBy reference an unknown target entity property.
I have two tables:
1) D_LIBRO Pk---> ISBN, Fk--->ID_CATEGORIA
2) D_CATEGORIA_LIBRO Pk---> ID
Mapping seems right...
@OneToMany(fetch = FetchType.LAZY, mappedBy = "DCategoriaLibro")
public Set<DLibro> getDLibros() {
return this.DLibros;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_CATEGORIA", nullable = false)
public DCategoriaLibro getDCategoriaLibro() {
return this.DCategoriaLibro;
}
the error when i try to start the webapplication is :
mappedBy reference an unknown target entity property: com.bookswap.entity.DLibro.DCategoriaLibro in com.bookswap.entity.DCategoriaLibro.DLibros
thanks.
|
SCJP 6.0, SCWCD, SCBCD, SCDJWS 5.0
|
 |
James Sutherland
Ranch Hand
Joined: Oct 01, 2007
Posts: 550
|
|
Try, "dCategoriaLibro", or annotate the field instead of the get method.
|
TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
|
 |
 |
|
|
subject: mappedBy reference an unknown target entity property:
|
|
|