mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-23 07:11:55 +00:00
No effective change - add test for PrimaryKeyJoinColumn - insertWithoutExtra
This commit is contained in:
1 parent
a9a89938f9
commit
ae58d9223a
1 file changed
+19
@@ -21,6 +21,25 @@ public class TestOneToOnePrimaryKeyJoinOptional extends BaseTestCase {
|
||||
return prime;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void insertWithoutExtra() {
|
||||
|
||||
String desc = "" + System.currentTimeMillis();
|
||||
OtoUPrime p1 = new OtoUPrime("u" + desc);
|
||||
Ebean.save(p1);
|
||||
|
||||
Query<OtoUPrime> query = Ebean.find(OtoUPrime.class)
|
||||
.setId(p1.getPid())
|
||||
.fetch("extra", "eid");
|
||||
|
||||
OtoUPrime found = query.findOne();
|
||||
|
||||
if (found.getExtra() != null) {
|
||||
found.getExtra().getExtra(); // fails here, because getExtra should be null
|
||||
}
|
||||
assertThat(found.getExtra()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void insertUpdateDelete() {
|
||||
|
||||
|
||||
Reference in new issue
Block a user