How to create entity with a collection-type field

2019-04-13 03:33发布

问题:

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?



标签: jhipster