JHipster JDL Parse Error with Fractions值in field min

时间:2017-12-31 14:03:09

标签: java jhipster jdl

我正在开发JDL文件以在JHipster中生成我的entites。我有这个实体:

entity Currency {
    name String required,
    conversionRate Double required min(0.0001) 
}

我收到了这个错误:

执行jhipster:import-jdl entities.jdl

选项: 正在解析jdl。 发生了错误:         的SyntaxError 错误信息:         预期“)”,['\ n'|'\ t'|'\ r'|' “| | ],或[0-9]但“。”找到。

位置:         在l.9。

错误:SyntaxError:预期“)”,['\ n'|'\ t'|'\ r'|' “| | ],或[0-9]但“。”找到。 events.js:160       扔掉//未处理的'错误'事件       ^

错误:错误! 从JDL解析实体时出错

at Environment.error (/Users/Macpro/Projects/pf-jhipster4/node_modules/yeoman-environment/lib/environment.js:157:40)
at error (/Users/Macpro/Projects/pf-jhipster4/node_modules/generator-jhipster/generators/generator-base.js:1964:18)
at parseJDL (/Users/Macpro/Projects/pf-jhipster4/node_modules/generator-jhipster/generators/import-jdl/index.js:113:26)
at Object.<anonymous> (/Users/Macpro/Projects/pf-jhipster4/node_modules/yeoman-generator/lib/index.js:399:25)
at /Users/Macpro/Projects/pf-jhipster4/node_modules/run-async/index.js:25:25
at /Users/Macpro/Projects/pf-jhipster4/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/Users/Macpro/Projects/pf-jhipster4/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

我试图逃避。没有成功。似乎是,双倍最小值不接受分数。

请注意,使用整数可以正常工作,例如:

conversionRate Double required min(1)

0 个答案:

没有答案