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

  • SEARCH
  • Home
  • 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 3855772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:49:39+00:00 2026-05-19T17:49:39+00:00

I work on a client-server application that works like that : 1- the client

  • 0

I work on a client-server application that works like that :

1- the client calls the server to get a object from the DB

2- the server opens a hibernate session and get() an entity. Then closes the session.

3- in order to reduce the data transfered through the network, only a part of the data is copied into a Data Transfer Object.

4- the client updates the data, and send the Data Transfer Object back to the server.

5- the server converts the DTO to a new entity.

6- so the question is:

How to persist/merge the data from the client with the data from the database without overiding non-null values stored in the DB ?

Do I need to use update() ? merge() ? do I need to use the “dynamic-update=true” property ?

  • 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-05-19T17:49:40+00:00Added an answer on May 19, 2026 at 5:49 pm

    I think the only safe strategy is to load current entity form DB in step 5 and then to copy DTO into it before saving it again.

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

Sidebar

Related Questions

While installing an application onto a client's server, I would like to make sure
I am starting a new client/server project at work and I want to start
Last Friday where I work, an oracle client was upgarded and our IIS server
A client wants me to do some maintenance work to a VB 6.0 application
We have a C# .Net client application that sends some commands via REST over
I have a Flex 4 client application that is under development in parallel with
Say a client is happy with the work you've done creating a script to
I've been doing a project at work recently focused on an almost entirely client-driven
Here at work, we are working on a newsletter system that our clients can
Learning java server technologies, trying to clarify some things. There are few technologies that

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.