Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Add support for List of datatype #129

Closed
agoncal opened this issue Jun 21, 2017 · 7 comments
Closed

Add support for List of datatype #129

agoncal opened this issue Jun 21, 2017 · 7 comments

Comments

@agoncal
Copy link

agoncal commented Jun 21, 2017

It would be good to have support for lists of datatypes. For example, here I could map a proposal which has a list of tags :

entity Proposal {
    title String,
    tags List<String>
}

This could generate the following entity :

@Entity 
public class Proposal {
   private String title;

   @ElementCollection
   @CollectionTable(name="tag_proposals", joinColumns=@JoinColumn(name="proposal_id"))
   @Column(name="tag")
   List<String> tags;

And why not allowing also sets :

entity Proposal {
    title String,
    rakings Set<Integer>,
    tags List<String>
}
@MathieuAA
Copy link
Member

That'd be interesting indeed! Again, all the heavy work would have to happen in the generator.
cc @jhipster/developers

@deepu105
Copy link
Member

deepu105 commented Jun 21, 2017

I also had many people asking me about this feature so I think might be worth to add in next major version

@MathieuAA
Copy link
Member

@agoncal I'll try some things this week-end

@hakandilek
Copy link

better to discuss together with jhipster/generator-jhipster#6275.

@agoncal
Copy link
Author

agoncal commented Aug 25, 2017

Closing and referencing this issue on Enriching the JDL grammar #6275

@agoncal agoncal closed this as completed Aug 25, 2017
@delkant
Copy link

delkant commented Jan 18, 2018

Was this feature forgotten or declined? is there any plans to have it in the future?. I can see it as part of the features described in the first post here#6275 but not included/explained at the end. The ticket also was closed with the tag for version 4.8 but I cannot find anything like List<String|Integer> in the documentation. Thanks.

@MathieuAA
Copy link
Member

@delkant Searching a little bit should have made you look at this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants