diff --git a/packages/orm/angel_orm_test/lib/src/models/leg.g.dart b/packages/orm/angel_orm_test/lib/src/models/leg.g.dart index 129d46d6..f4c6d690 100644 --- a/packages/orm/angel_orm_test/lib/src/models/leg.g.dart +++ b/packages/orm/angel_orm_test/lib/src/models/leg.g.dart @@ -105,7 +105,7 @@ class LegQuery extends Query { name: (row[3] as String?)); if (row.length > 4) { model = model.copyWith( - foot: FootQuery.parseRow(row.skip(4).take(5).toList()).value); + foot: FootQuery.parseRow(row.skip(4).take(5).toList()).firstOrNull); } return Optional.ofNullable(model); } diff --git a/packages/orm/angel_orm_test/lib/src/models/tree.g.dart b/packages/orm/angel_orm_test/lib/src/models/tree.g.dart index b2086ea8..8e270244 100644 --- a/packages/orm/angel_orm_test/lib/src/models/tree.g.dart +++ b/packages/orm/angel_orm_test/lib/src/models/tree.g.dart @@ -104,8 +104,9 @@ class TreeQuery extends Query { updatedAt: (row[2] as DateTime?), rings: (row[3] as int?)); if (row.length > 4) { - model = model.copyWith( - fruits: [FruitQuery.parseRow(row.skip(4).take(5).toList()).value]); + model = model.copyWith(fruits: [ + FruitQuery.parseRow(row.skip(4).take(5).toList()).firstOrNull + ]); } return Optional.ofNullable(model); } diff --git a/packages/orm/angel_orm_test/lib/src/models/unorthodox.g.dart b/packages/orm/angel_orm_test/lib/src/models/unorthodox.g.dart index f9e33405..de9dbd74 100644 --- a/packages/orm/angel_orm_test/lib/src/models/unorthodox.g.dart +++ b/packages/orm/angel_orm_test/lib/src/models/unorthodox.g.dart @@ -261,20 +261,21 @@ class WeirdJoinQuery extends Query { var model = WeirdJoin(id: (row[0] as int?)); if (row.length > 2) { model = model.copyWith( - unorthodox: - UnorthodoxQuery.parseRow(row.skip(2).take(1).toList()).value); + unorthodox: UnorthodoxQuery.parseRow(row.skip(2).take(1).toList()) + .firstOrNull); } if (row.length > 3) { model = model.copyWith( - song: SongQuery.parseRow(row.skip(3).take(5).toList()).value); + song: SongQuery.parseRow(row.skip(3).take(5).toList()).firstOrNull); } if (row.length > 8) { - model = model.copyWith( - numbas: [NumbaQuery.parseRow(row.skip(8).take(2).toList()).value]); + model = model.copyWith(numbas: [ + NumbaQuery.parseRow(row.skip(8).take(2).toList()).firstOrNull + ]); } if (row.length > 10) { model = model.copyWith( - foos: [FooQuery.parseRow(row.skip(10).take(1).toList()).value]); + foos: [FooQuery.parseRow(row.skip(10).take(1).toList()).firstOrNull]); } return Optional.ofNullable(model); } diff --git a/packages/orm/angel_orm_test/lib/src/models/user.g.dart b/packages/orm/angel_orm_test/lib/src/models/user.g.dart index cd4d26d8..fff0e4dd 100644 --- a/packages/orm/angel_orm_test/lib/src/models/user.g.dart +++ b/packages/orm/angel_orm_test/lib/src/models/user.g.dart @@ -123,8 +123,9 @@ class UserQuery extends Query { password: (row[4] as String?), email: (row[5] as String?)); if (row.length > 6) { - model = model.copyWith( - roles: [RoleQuery.parseRow(row.skip(6).take(4).toList()).value]); + model = model.copyWith(roles: [ + RoleQuery.parseRow(row.skip(6).take(4).toList()).firstOrNull + ]); } return Optional.ofNullable(model); }