4

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!

Mohsen
  • 4,536
  • 2
  • 27
  • 49
Chidra
  • 51
  • 1

1 Answers1

1

Not supported by JHipster 3 either by JDL or by entity sub generator

Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49