• Post Reply Bookmark Topic Watch Topic
  • New Topic

Auto generated Primary Key handling with CMP EJB  RSS feed

 
Aflatoon banju
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a table where the primary key is an autogenerated integer field.how do i write a CMP EJB in this case?
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while ejbCreate() you don't need to pass the value for this field.This will be done by the app server
This is assuming you have a autogeneration configured ( oracle seq or seperate sequence table etc)
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're on JBoss, there are chances that you'll go through some problems.
I i guessed right, just follow this

http://www.coderanch.com/t/88598/JBoss/JBoss-CMP-auto-increment-not
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!