【问题标题】:Add fields to entity by means of jhipster通过 jhipster 向实体添加字段
【发布时间】:2019-02-06 15:05:11
【问题描述】:

我在 jhipster 的帮助下创建了实体并手动修改了实体。 随着时间的推移,我需要添加更多字段。 我运行jhipster entity Download 并一步一步地按照说明进行操作。此后生成器谈到冲突并提供完全替换许多文件:

 conflict .jhipster/Download.json
? Overwrite .jhipster/Download.json? show the differences between the old and the new

应该是这样吗? 然后我不明白哪些代码包含下一个注释行:

@CreatedBy
@ManyToOne
@JsonIgnoreProperties("downloads")
private User user;

// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public UUID getId() {
    return id;
}

【问题讨论】:

    标签: java jhipster


    【解决方案1】:

    要在 JHipster 实体中添加字段,唯一可行的方法是重新生成该实体并覆盖现有文件。

    JHipster 当前未使用添加的针(我在代码中找不到对它的引用),并且仅因为用户在此问题 https://github.com/jhipster/generator-jhipster/issues/6246 中请求它而存在。

    【讨论】:

      猜你喜欢
      • 2017-03-12
      • 2018-06-08
      • 2020-07-01
      • 2019-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多