Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8329165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:41:04+00:00 2026-06-09T01:41:04+00:00

I am doing a saveOrUpdate but the problem I’m facing is that it is

  • 0

I am doing a saveOrUpdate but the problem I’m facing is that it is overwriting the old data which is already in the table.

I have a table in which there is a correlationID as key and against that id i’m persisting some data first, then again against the same id passing an acknowledgement message in another column of the same table later. But this overwrites the old data I have in the table and what I get is an empty table with the id & message, the other columns are nullified.

I am using Hibernate Mapping Files (.hbm.xml)

Suggestions on how to keep the old data and just update the one column only ?

Update:

I am getting this when trying to load persistence instance:

SEVERE: IllegalArgumentException in class: common.entity.AbstractDetailsKey, getter method of property: correlationId
...
org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of common.entity.AbstractDetailsKey.correlationId
...
Caused by: java.lang.IllegalArgumentException: 666
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:41:07+00:00Added an answer on June 9, 2026 at 1:41 am

    Are you loading the entity first, before updating and saving? Or are you just creating an entity instance, slapping the id you want in there, and changing one property on the empty instance? That would be bad, because you just told your ORM that the entity with id X now only has one property with a value, so of course it’s going to null out all the other column’s values.

    Sounds like you need to either

    1) Load the row, then make the modification, then saveOrUpdate
    2) Use hql to update just the one column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

doing this in AppDelegate: viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; Is there any problem
I have JDBC code which inserts into a database table by executing a PreparedStatement.
I have a list of 10 data objects that I want to insert/update to
I am doing a standart getHibernateTemplate().saveOrUpdate() in Spring Hibernate application, but function never returns
Doing so select name from sqlite_master where type='table' but I need to display all
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
Doing some jquery animation. I have certain divs set up with an attribute of
Doing a mysqli query and COUNTing the results, is there a preferred comparison operator
Doing a simple Squeryl database lookup, but trying to exclude a value. I've tried:
I have a class that contains a collection that is mapped to a many-to-many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.