• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generic Generator on non primary key

 
Krishan Chauhan
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.


Thanks,
Krishan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic