#1617 - save() on a reference bean causes insert to occur ... results in duplicate key exception

Tests broken by fix as the test inserts only included id value in the insert
This commit is contained in:
rob bygrave
2019-01-22 21:59:04 +13:00
parent 4e1f817ade
commit 3483372ae3
@@ -37,8 +37,8 @@ public class TestOnCascadeDeleteChildrenWithCompositeKeys extends BaseTestCase {
Ebean.deleteAll(Ebean.find(User.class).findList());
// insert 2 User records
Ebean.save(new User(1L));
Ebean.save(new User(2L));
Ebean.save(new User(1L, "one"));
Ebean.save(new User(2L, "two"));
}
/**
@@ -99,8 +99,9 @@ public class TestOnCascadeDeleteChildrenWithCompositeKeys extends BaseTestCase {
public User() {
}
public User(Long id) {
public User(Long id, String name) {
this.id = id;
this.name = name;
}
@Id