This week's book giveaway is in the
We're giving away four copies of
and have Sam Newman on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
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
Have you checked out
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