mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
FIX: possible NPE in DeleteUnloadedForeignKeys.deleteCascade and in initPostTarget (#1601)
This commit is contained in:
committed by
Rob Bygrave
parent
50de32af29
commit
b18bc82b8a
@@ -1,6 +1,7 @@
|
||||
package org.tests.family;
|
||||
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.Ebean;
|
||||
import io.ebean.annotation.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
@@ -218,6 +219,10 @@ public class TestInheritance extends BaseTestCase {
|
||||
assertEquals("Foo", grandparent1.getFamilyName());
|
||||
assertEquals("Munich", grandparent1.getAddress());
|
||||
assertEquals(1, grandparent1.getEffectiveBean().getId().intValue());
|
||||
|
||||
Ebean.find(ChildPerson.class).delete();
|
||||
Ebean.find(GrandParentPerson.class).delete();
|
||||
Ebean.find(EBasic.class).delete();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -260,5 +265,8 @@ public class TestInheritance extends BaseTestCase {
|
||||
count = server().find(GrandParentPerson.class).where().eq("basicSameName.description", "Description A").findCount();
|
||||
assertEquals(1, count);
|
||||
|
||||
Ebean.find(ChildPerson.class).delete();
|
||||
Ebean.find(GrandParentPerson.class).delete();
|
||||
Ebean.find(EBasic.class).delete();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user