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,34 @@
|
||||
package org.tests.model.zero;
|
||||
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.Ebean;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
public class TestWithZero extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void testInsertUpdate() {
|
||||
|
||||
|
||||
WithZero withZero = new WithZero();
|
||||
assertEquals(0, withZero.getId());
|
||||
assertEquals(0, withZero.getVersion());
|
||||
assertNull(withZero.getName());
|
||||
|
||||
WithZeroParent parent = new WithZeroParent();
|
||||
parent.getChildren().add(withZero);
|
||||
|
||||
Ebean.save(parent);
|
||||
|
||||
parent.getChildren().add(new WithZero());
|
||||
|
||||
//withZero.setName("Foo");
|
||||
Ebean.save(parent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user