• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Id generation on EJB 3.0

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
reply
    Bookmark Topic Watch Topic
  • New Topic