File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Problem with @GeneratedValue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Problem with @GeneratedValue" Watch "Problem with @GeneratedValue" New topic
Author

Problem with @GeneratedValue

Deepa Datar
Greenhorn

Joined: Jan 31, 2003
Posts: 4
Hi All,

I have a simple Entity class.



When I execute the above code I get the following exception


Can anyone suggest where the problem lies?
Deepa Datar
Greenhorn

Joined: Jan 31, 2003
Posts: 4
I am adding a record by calling




Thanks
Deepa Datar
Deepa Datar
Greenhorn

Joined: Jan 31, 2003
Posts: 4
Its working now. I changed the GenerationType from AUTO to TABLE. I am using MS SQLServer.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with @GeneratedValue
 
Similar Threads
one to one unidirectional mapping in jpa
I need help with Hibernate
hibernate one to many reationship.
ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
Hibernate - Cascading problems using ManyToOne association