Hello People:
I'm student and I be working with toplink since a month. An I find a problem discribed like this
The @JoinColumns on the annotated element [private java.util.List ObjNegocio.Afiliado.listaserv] from the entity class [class ObjNegocio.Afiliado] is incomplete. When the source entity class uses a composite primary key, a @JoinColumn must be specified for each join column using the @JoinColumns. Both the name and the referenceColumnName elements must be specified in each such @JoinColumn.
What i try to do is get a list of services of a specific employee, and the service entity have a compound query, and the key is embeded in a ServicesPK class
Here is my Code:
@Embeddable
public class ServicioPK implements Serializable {
@JoinTable(name="employee",joinColumns=
@JoinColumn(name="idemployee",referencedColumnName="idemployee")
)
@Column(name = "idemployee", nullable = false)
private int idemployee;
@JoinTable(name="Instit",joinColumns=
@JoinColumn(name="idInstit",referencedColumnName="idInstit")
)
@Column(name = "idInstit", nullable = false)
private int idInstit;
@JoinTable(name="Charge",joinColumns=
@JoinColumn(name="idCharge",referencedColumnName="idCharge")
)
@Column(name = "idCharge", nullable = false)
private int idCharge;
The Question are?
What is wrong with the code that I Wrote,and how I should correct them?
If you have any direction or thread treating this problem?
Thanks before all, i know that my restlessness will costs part of you valuable time
---------------------------------
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
Probalo ya!