i want generate Custom Id in JPA it must be primary key of table.
there are many examples to create Custom Id using hibernate like this
i want same implementation but in JPA.The id must be alphanumeric like STAND0001
Thanks.
i want generate Custom Id in JPA it must be primary key of table.
there are many examples to create Custom Id using hibernate like this
i want same implementation but in JPA.The id must be alphanumeric like STAND0001
Thanks.
You can do it using
GenericGenerator
like this :and the custom generator class (will add prefix to the ID, you can make it do what you like):