mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-28 07:26:56 +00:00
#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:
1 parent
4e1f817ade
commit
3483372ae3
1 file changed
+4
-3
+4
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user