hasOne false subquery test
This commit is contained in:
parent
975935cffd
commit
2948304df1
1 changed files with 8 additions and 0 deletions
|
@ -85,4 +85,12 @@ hasOneTests(FutureOr<QueryExecutor> Function() createExecutor,
|
||||||
expect(leg.foot.id, foot.id);
|
expect(leg.foot.id, foot.id);
|
||||||
expect(leg.foot.nToes, foot.nToes);
|
expect(leg.foot.nToes, foot.nToes);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('sets null on false subquery', () async {
|
||||||
|
var legQuery = new LegQuery()
|
||||||
|
..where.id.equals(originalLeg.idAsInt)
|
||||||
|
..foot.where.legId.equals(originalLeg.idAsInt + 1024);
|
||||||
|
var leg = await legQuery.getOne(executor);
|
||||||
|
expect(leg.foot, isNull);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue