I fixed this issue but it looks like a hack to me.. I used native SQL query to insert.
Hey Vijitha, To test the update I manually inserted the values into the database and then did an update. It worked, so basically sessionFactory.getCurrentSession().update works but sessionFactory.getCurrentSession().save throws a class cast exception.
I think it has something to do with the primary key. It fails for all the tables where I don't have a sequence number generator and I manually enter the primary key.
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad: