mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-28 07:26:56 +00:00
NPE in cacheable bean with embeddedid on delete (#1570)
This commit is contained in:
1 parent
ebf96c87bf
commit
0405ceb96c
2 files changed
+23
No files matched your search
@@ -32,4 +32,23 @@ public class TestCKeyDelete extends BaseTestCase {
|
||||
Assert.assertNull(notFound);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteWhere() {
|
||||
|
||||
CKeyParentId id = new CKeyParentId(100, "deleteMe");
|
||||
CKeyParentId searchId = new CKeyParentId(100, "deleteMe");
|
||||
|
||||
CKeyParent p = new CKeyParent();
|
||||
p.setId(id);
|
||||
p.setName("testDelete");
|
||||
|
||||
Ebean.save(p);
|
||||
|
||||
Ebean.createQuery(CKeyParent.class).where().eq("id.oneKey", 100).delete();
|
||||
|
||||
CKeyParent found = Ebean.find(CKeyParent.class).where().idEq(searchId).findOne();
|
||||
|
||||
Assert.assertNull(found);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user