Reputation: 390
How to create a foreign key with ON UPDATE CASCADE in eclipselink. Can anyone explain how to create such foreign key
Is this feature available in eclipselink?
srini
Upvotes: 0
Views: 464
Reputation: 6738
You can use these properties cascade = CascadeType.ALL or cascade = CascadeType.MERGE when you want to cascade update. see sample;
@Entity
class Employee {
@OneToOne(cascade=CascadeType.ALL)
private Address address;
}
Upvotes: 1