简体   繁体   English

如何在JHipster中向JHI_USER添加新字段

[英]How to add new field to JHI_USER in JHipster

I have a JHipster App setup. 我有一个JHipster应用设置。 I just need to add a column gender to the User Table and the other changes associated with it. 我只需要向用户表和与其相关的其他更改添加列性别。 Is there any way to make JHipster do this? 有什么办法可以使JHipster做到这一点? trying to add an entity with the name JHI_USER ends up trying to create it and failing. 尝试添加名称为JHI_USER的实体最终导致创建它失败。

您必须手动完成,在“ domain/User添加列,并且不要忘记更新liquibase设置。

Less intrusive: you add another entity that would contain all the additional fields you need and add a one-to-one relationship with user. 减少干扰:添加另一个实体,该实体将包含所需的所有其他字段,并与用户建立一对一关系。

This way you can re-generate your app with more recent version and keep your changes. 这样,您可以使用最新版本重新生成您的应用并保留您的更改。

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

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