Reputation: 51
My goal is to generate an entity that holds on to a value object using the JDL studio tool that jhipster provides using MongoDB. I see how to create an entity, that can optionally have a DTO, but I can't figure out how to create a value object...Maybe it's just not possible, but I'd be surprised to be the only that has that need.
Below is an example of the code I'd like to have generated.
// Person is an entity that has Address which is a value Object
@Document(collection = "person")
Class Person{
@Id
private String id;
private String name;
private Address address;
}
// Address is value object (No ID).
Class Address {
private String street;
private String zip;
private String city;
}
Using JDL Studio, I was hoping I could do:
entity Person {
name String,
address Address
}
value Address {
street String,
zip String,
city String,
}
Thank you all!
Upvotes: 4
Views: 776
Reputation: 16284
Not supported by JHipster 3 either by JDL or by entity sub generator
Upvotes: 1