Create Primary Key other than Id in Jhipster Entity

Viewed 9931

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?

2 Answers
Related