Abdull
Abdull

Reputation: 27822

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

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)?

Upvotes: 5

Views: 3347

Answers (1)

Ismail Sahin
Ismail Sahin

Reputation: 2710

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?

Upvotes: 3

Related Questions