I have set CascadeType.ALL in my entity relation, but it works partially whenevr I persist an entity.
Ex : ` Member entity :
@OneToMany(mappedBy="member", cascade={CascadeType.ALL})
private List<ContactInfo> contactInfos;
and ContactInfo entity :
@ManyToOne
@JoinColumn(name="MEMBERID")
private Member member;
`
Member
details and also ContactInfo
data are persisted. But Member.Id
is not updated in ContactInfo
table as I have nullable foreignkey constraint in ContactInfo
table.
How would I make JPA to automatically update Member.Id in ContactInfo also whenever I persist Member?
Regards,
Satya