Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Synchronizing detached POJOs

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have JTable whose model holding Detached Hibernate entities.
I read the entire DB table to the JTable model (approx 20 rows)
My user is working offline; remove rows, changes rows, etc,
How do I synchronize the detached objects to the db after my user commits his changes?
Do I have to implement the CRUD logic and dirty checking?
Thank you
Sharon
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My user is working offline; remove rows, changes rows, etc,


Implement dirty checking incase,
1. There are two or more users changing the "same" set of data offline.
&& 2. You need to inform the user that the data you are trying to change is not in the same state as it was when you read it. You might want to see the change which happened after you have read the data.

Use Update logic to update the changed set of data.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic