mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#919 - io.ebean package initial
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package org.tests.basic;
|
||||
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.Ebean;
|
||||
import org.tests.model.basic.TMapSuperEntity;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TestMappedSuper extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
TMapSuperEntity e = new TMapSuperEntity();
|
||||
e.setName("babana");
|
||||
|
||||
Ebean.save(e);
|
||||
|
||||
// select includes a transient property
|
||||
TMapSuperEntity e2 = Ebean.find(TMapSuperEntity.class)
|
||||
.where().idEq(e.getId())
|
||||
.select("id, name, myint, someObject, bananan")
|
||||
.findUnique();
|
||||
|
||||
Assert.assertNotNull(e2);
|
||||
|
||||
TMapSuperEntity eSaveDelete = new TMapSuperEntity();
|
||||
eSaveDelete.setName("babana");
|
||||
|
||||
Ebean.save(eSaveDelete);
|
||||
|
||||
Ebean.delete(eSaveDelete);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user