How to create entity with a collection-type field in JHipster?

百般思念 提交于 2019-12-06 09:27:56

问题


In our project, we work with a domain model Document. A document may have several titles, so with my JPA knowledge I'd model the Document entity like so:

@Entity
public class Document {

    private Set<String> titles;

    // ... getters and setters
}

How can I have jHipster generate entities with collection attributes (or, synomymously, collection fields)?


回答1:


Depending on jdl document here the collection type for field is not handled yet.

I guess you already think of creating an title object and create one-to-many relation with document right?



来源:https://stackoverflow.com/questions/38747009/how-to-create-entity-with-a-collection-type-field-in-jhipster

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!