• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL Autoincriment problem with JPA

 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL,
I'm using jpa,hibernate on mysql. here Im facing one proglem. My tables are keyed with auto_increment primary keys. I need to persist course-branches(1-n).


But here because of auto_increment id in course table , after persisting
course object is not reflecting it's id. because of this persisting branches failing.
please help me

thanks
raghu
 
Raghunath Nandyala
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is :

How do you retrieve an auto increment key after persisting to the database

the primary key is not sync with database..

raghu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic