• 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

Autogenerated field as String datatype

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have query regarding the primary key generation for entity bean (EJB 2.0) in JBoss Application server.
For Example:
I am having a table product with product_id and product_name as two columns with product_id as primary key.

I want the product_id to be autogenerated with the user specified format. For example, by defining product_id as auto_increment, it will increment the value with integer data type.
However, I want the primaty key to be String datatype. i want the auotgenerated number plus the string definition.
I want the primary as,
product1 (product+auto_incremented_number)
product2
product3
..
..

PLease help to throw some ligh on it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic