wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Basic question regarding Hibernate, Oracle and Sequence Numbers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Basic question regarding Hibernate, Oracle and Sequence Numbers" Watch "Basic question regarding Hibernate, Oracle and Sequence Numbers" New topic
Author

Basic question regarding Hibernate, Oracle and Sequence Numbers

K DeLucia
Ranch Hand

Joined: Apr 11, 2008
Posts: 68
I'm just starting to try using Hibernate. I'm following a basic tutorial to map a couple of fields to a database table. I have two columns in the table. When I attempt to update the table, I get this error:

java.sql.SQLSyntaxErrorException: ORA-02289: sequence does not exist

My table does not have a sequence, and I don't particularly want it to. Is this required? Do I have to add a sequence to my Oracle table in order to use Hibernate with Oracle? Or is there some way I can do the insert/update without needing a sequence?

Thanks!
K DeLucia
Ranch Hand

Joined: Apr 11, 2008
Posts: 68
Nevermind. I didn't understand the generator element. Got it now. Gotta go RTFM!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Basic question regarding Hibernate, Oracle and Sequence Numbers
 
Similar Threads
what does hiobernate Session's update work ?
id is not set after getSession().save()
Help Needed....
Isolation in Weblogic 8.1
Lock Table issue: Need help