I have an Entity
@Entity
public class EntityA{
@Id
@GeneratedValue
private Long id;
//other columns
-------
}
I am trying to create a child Entity without primary key
@Entity
public class EntityB{
@ManyToOne
private EntityA entityA;
//other columns
-------
}
But this is throwing error for primary key for EntityB.
Can anyone help here to make this relationship without primary key in child entity.