This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto Increment Problem with JPA and EJB

 
Samson Mlati
Ranch Hand
Posts: 41
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I followed the simple example found here

http://netbeans.org/kb/docs/web/jsf20-crud.html

Created a crud web app and I am hoping to learn how to customize this so I can solve a problem. My main issue with JPA/EJB is that it seems not able to work with auto_increment values, my JSF pages must have the id which should ideally be generated by MySQL.. I have looked at the annotations in the mapping and the id is marked with annotation IDENTITY, i have tried TABLE and AUTO but none of them work. My pages must send the id value. How do I fix this?

Thanks.

Mlati.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic