gpt4 book ai didi

java - 通过jhipster向实体添加字段

转载 作者:行者123 更新时间:2023-11-30 05:47:51 24 4
gpt4 key购买 nike

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

 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;
}

最佳答案

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

添加的针目前未被 JHipster 使用(我在代码中找不到对它的引用),它存在只是因为本期中的用户请求 https://github.com/jhipster/generator-jhipster/issues/6246 .

关于java - 通过jhipster向实体添加字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54538393/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com