mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
Refactor move tests from ebean-core to ebean-test
This commit is contained in:
1 parent
0b00a14fd3
commit
eab56d323b
1650 files changed
+185
-147
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package org.tests.m2m;
|
||||
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import org.tests.model.m2m.MnyTopic;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Added to test DDL generation for ManyToMany related back to itself.
|
||||
*/
|
||||
public class TestM2MSelfRelationship extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
DB.getDefault();
|
||||
|
||||
// Create 2 roles r0 and r1
|
||||
MnyTopic r0 = new MnyTopic("r0");
|
||||
MnyTopic r1 = new MnyTopic("r1");
|
||||
|
||||
// Save r1 and r2
|
||||
DB.save(r0);
|
||||
DB.save(r1);
|
||||
|
||||
r0.getSubTopics().add(r1);
|
||||
DB.save(r0);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user