I want to create two entities.
Departments(Department Id,Department Name) and Employees(Employee Id, Employee Name, Address).
I want these primary keys for the tables:
Department Id for Departments, Employee Id for Employees.
And Jhipster creates two tables as: Departments(Id, Department Id, Department Name) and Empployee(Id, Employee Id, Employee Name, Address)
and it takes Id as a primary key in both of these tables.
In my Database Design I want Department Id and Employee Id as a primary key. So what to do next?
Support for custom ids was added in the new JHipster Release v7.0.0.
In JDL you can write:
entity Foo {
@Id customId Long
}
or
entity Foo {
id UUID
}
see https://github.com/jhipster/generator-jhipster/pull/13258
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With