• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generic Generator on non primary key  RSS feed

 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!