mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
29 lines
626 B
Java
29 lines
626 B
Java
package org.tests.inheritance;
|
|
|
|
import io.ebean.BaseTestCase;
|
|
import io.ebean.Ebean;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
import org.junit.Test;
|
|
|
|
public class TestTreeOrganisations extends BaseTestCase {
|
|
|
|
@Test
|
|
public void test() {
|
|
|
|
OrganizationTreeNode treeNode = new OrganizationTreeNode();
|
|
treeNode.setName("tree");
|
|
|
|
OrganizationUnit node = new OrganizationUnit();
|
|
node.setTitle("node");
|
|
|
|
treeNode.setOrganizationNode(node);
|
|
Ebean.save(treeNode);
|
|
|
|
treeNode = Ebean.find(OrganizationTreeNode.class, treeNode.getId());
|
|
assertEquals(node, treeNode.getOrganizationNode());
|
|
|
|
}
|
|
}
|