mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#323 - DDL Generation support for foreign key cascade options
This commit is contained in:
@@ -35,7 +35,7 @@ public class TestOneToOnePrimaryKeyJoin extends BaseTestCase {
|
||||
OtoPrime found = query.findOne();
|
||||
|
||||
assertThat(found).isNotNull();
|
||||
assertThat(sqlOf(query)).contains("select t0.pid, t0.name, t0.version, t0.pid from oto_prime t0 where t0.pid = ?")
|
||||
assertThat(sqlOf(query, 10)).contains("select t0.pid, t0.name, t0.version, t0.pid from oto_prime t0 where t0.pid = ?")
|
||||
.as("we don't join to oto_prime_extra");
|
||||
|
||||
assertThat(found.getName()).isEqualTo("p" + desc);
|
||||
@@ -47,7 +47,7 @@ public class TestOneToOnePrimaryKeyJoin extends BaseTestCase {
|
||||
OtoPrime oneWith = queryWithFetch.findOne();
|
||||
|
||||
assertThat(oneWith).isNotNull();
|
||||
assertThat(sqlOf(queryWithFetch)).contains("select t0.pid, t0.name, t0.version, t1.eid, t1.extra, t1.version from oto_prime t0 join oto_prime_extra t1 on t1.eid = t0.pid where t0.pid = ?")
|
||||
assertThat(sqlOf(queryWithFetch, 10)).contains("select t0.pid, t0.name, t0.version, t1.eid, t1.extra, t1.version from oto_prime t0 join oto_prime_extra t1 on t1.eid = t0.pid where t0.pid = ?")
|
||||
.as("we join to oto_prime_extra");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user