Search within Object Relational Mapping
Register / Login
Win a copy of
this week in the
JDBC and Relational Databases
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
Hibernate save Oracle Number
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
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
java.lang.ClassCastException: java.lang.Long incompatible with com.test.Employee
java.math.BigDecimal incompatible with com.test.Employee -- If I change it to BigDecimal
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
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
Boost this thread!
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