Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Id generation on EJB 3.0  RSS feed

 
Patrick Mugabe
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class that generates String IDs. I would like to pick up the ID from that class when I use the @Id annotation in my Entity. Is there a way this can be done. I have been researching all I see are Ids generated from Tables.

Ideas please???
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Patrick Mugabe:
I have a class that generates String IDs. I would like to pick up the ID from that class when I use the @Id annotation in my Entity. Is there a way this can be done. I have been researching all I see are Ids generated from Tables.

Ideas please???


Generated? Like using @GeneratedValue ? Try taking it out. like now you have

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!