mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
28 lines
644 B
Java
28 lines
644 B
Java
package org.tests.inheritance;
|
|
|
|
import io.ebean.BaseTestCase;
|
|
import io.ebean.DB;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
|
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);
|
|
DB.save(treeNode);
|
|
|
|
treeNode = DB.find(OrganizationTreeNode.class, treeNode.getId());
|
|
assertEquals(node, treeNode.getOrganizationNode());
|
|
|
|
}
|
|
}
|