File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Hibernate save Oracle Number
Joined: May 28, 2008
Nov 02, 2011 01:05:49
I am having issues with Hibernate save. I wanted the newly created primary key so I had saved the object but it gives me a class cast exception. Persist works just fine.
Employee e = sessionFactory.getCurrentSession().save does not work
incompatible with com.test.Employee
incompatible with com.test.Employee -- If I change it to
Oracle column - "ID" NUMBER(36 , 0) NOT NULL
@GeneratedValue(generator = "testKey")
@SequenceGenerator(name = "testKey", sequenceName = "ID_SEQ")
@Column(name = "ID")
private Long id;
Should I be using something other than Long
I agree. Here's the link:
subject: Hibernate save Oracle Number
Setting SYSDATE for insert/update
Weblogic 10.3.1 + Oracle 10g : Invalid Username / Password on LOB inserts!
Hibernate_listing database values
Hibernate: using oracle sequence
Sequence generation issue
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015