简体   繁体   English

当JHipster从JDL开始创建伪数据时?

[英]When JHipster create the dummy data starting from JDL?

I'm new to JHipster and I'm doing some experiment. 我是JHipster的新手,正在做一些实验。
I created my fist JHipster App and imported the "default" JDL that can be downloaded from here: JDL Studio (without any modification). 我创建了第一手JHipster App,并导入了可以从此处下载的“默认” JDL: JDL Studio (未做任何修改)。

After the import, I see my entity filled with some demo data and some csv file has been created under config/liquidbase/data with the same info. 导入后,我看到我的实体充满了一些演示数据,并且在config/liquidbase/data下创建了具有相同信息的csv文件。

I checked the jhipster-jdl.jh file and there is no data specification there. 我检查了jhipster-jdl.jh文件,那里没有数据规范。

I don't understand where that data is created and what is the logic that allows creating that dummy data. 我不知道该数据在哪里创建以及允许创建该伪数据的逻辑是什么。

The values are generated by Faker.js in the table.csv template . 这些值由Faker.jstable.csv模板中生成。 They are based on the column name, and are not configurable at this point. 它们基于列名,并且此时不可配置。

If you don't want the data to be inserted into the database, you can remove the faker context from the config in application-dev.yml 如果您不希望将数据插入数据库中,则可以从application-dev.yml的配置中删除faker上下文。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM