From 718064ad66421bc5cae909e7ae004e857a7f2ab0 Mon Sep 17 00:00:00 2001 From: thomashii Date: Tue, 18 May 2021 08:27:49 +0800 Subject: [PATCH] Updated angel_orm_generator --- .../orm/angel_orm_generator/lib/src/orm_build_context.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/orm/angel_orm_generator/lib/src/orm_build_context.dart b/packages/orm/angel_orm_generator/lib/src/orm_build_context.dart index 11e1ba46..d9dbf678 100644 --- a/packages/orm/angel_orm_generator/lib/src/orm_build_context.dart +++ b/packages/orm/angel_orm_generator/lib/src/orm_build_context.dart @@ -201,7 +201,7 @@ Future buildOrmContext( pluralize(foreign!.buildContext.modelClassNameRecase.snakeCase); } on StackOverflowError { throw UnsupportedError( - 'There is an infinite cycle between ${clazz.name} and ${field.type.name}. This triggered a stack overflow.'); + 'There is an infinite cycle between ${clazz.name} and ${field.type.getDisplayString(withNullability: true)}. This triggered a stack overflow.'); } } } @@ -276,7 +276,6 @@ Future buildOrmContext( var foreign = relation.throughContext ?? relation.foreign; var type = foreignField.type; if (isSpecialId(foreign, foreignField)) { - // TODO: incorrect type assignments //type = field.type.element.context.typeProvider.intType; type = field.type; } @@ -288,7 +287,7 @@ Future buildOrmContext( ctx.relations[field.name] = relation; } else { if (column.type == null) { - throw 'Cannot infer SQL column type for field "${ctx.buildContext.originalClassName}.${field.name}" with type "${field.type.displayName}".'; + throw 'Cannot infer SQL column type for field "${ctx.buildContext.originalClassName}.${field.name}" with type "${field.type.getDisplayString(withNullability: true)}".'; } // Expressions...