Not satisified with the standard autoincrement implementation of the default ID columns with the JHipster generator, I did some digging to see what was possible.
I got a tip in the JHipster issues comments on Github, that I could create my own column (not named ID) with the UUID type. This is what I was trying for the ID : id UUID

Unfortunatly it seems that Julien Dubois (one of the primary JHipster contributors) is against having ID columns be UUID’s (or strings/varchar/blobs) because of performance and efficiency reasons, so all feature requests in this direction have been closed.
So instead the recommendation was to leave the id and create an additional uuid column (with the type UUID). While this might work in some cases, I really want the UUID to be the primary key.
I still have a few more tips to try, like:
- just modify the generated code myself (not so great if I want to iterate)
- use the Jhipster Generator DB Helper Blueprint to rename the ID and possibly the type (but I could not get this working with JHipster 6.9.0)
- use the JHipster Postgres UUID Converter Blueprint (but I am not using postgres)
- wait for a new, proposed feature for compound indexes
I’ll report back if I discover more. In the mean time you can at least used the UUID column.