liyupi/sql-father-backend-public

一键生成结果报错:系统错误

Closed this issue · 1 comments

报错导入SQL如下:

-- mysql
CREATE TABLE if not exists car_info (
    `id` varchar(32),
    `vin` varchar(17)  COMMENT '车辆识别代码,唯一标识符,长度为17位',
    `brand` varchar(50) COMMENT '车辆品牌',
    `model` varchar(50) COMMENT '车辆型号',
    `vehicle_type` varchar(50) COMMENT '车辆类型',
    `production_date` date COMMENT '车辆生产日期',
    `sale_date` date COMMENT '车辆销售日期',
    `nominal_range_km` varchar(50) COMMENT '标称续航里程,单位为 km',
    `vehicle_use_property` varchar(50) COMMENT '车辆使用性质',
    `odometer_km` varchar(50) COMMENT '表显里程,单位为 km',
    `battery_manufacturer` varchar(50) COMMENT '电池厂商',
    `battery_material` varchar(50) COMMENT '电池材料',
    `battery_type` varchar(50) COMMENT '电池类型',
    `battery_production_date` date COMMENT '电池生产日期',
    `nominal_voltage` varchar(100) COMMENT '标称电压(V)',
    `rated_capacity` varchar(100) COMMENT '额定容量(Ah)',
    PRIMARY KEY (`id`)
) COMMENT='车辆基本信息';

报错信息如下:

Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> field.comment  [in template "typescript_type.ftl" at line 8, column 8]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${field.comment}  [in template "typescript_type.ftl" at line 8, column 6]
----

参考其他人的未合并进来的解决方案