通过jhipster的方式添加到实体领域

问题描述 投票:1回答:1

我创建实体的帮助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个回答
1
投票

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

所添加的针是当前未使用的由JHipster(我能找到代码中没有提到它),不仅是因为它是由在这个问题上https://github.com/jhipster/generator-jhipster/issues/6246用户请求存在。

© www.soinside.com 2019 - 2024. All rights reserved.