mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +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:
+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