I want to generate a random unique number for the non primary key column in the table.
Initially I thought @GenericGenerator willl do the job. But it seems to work only on the primary key i.e. fields annotated with @Id annotation.
Is there any way through which I can generate the value for non primary key column.