<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Optimistic-Locking on Rowanto Luo</title><link>https://log.rowanto.com/categories/optimistic-locking/</link><description>Recent content in Optimistic-Locking on Rowanto Luo</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 11 Feb 2014 11:00:00 +0000</lastBuildDate><atom:link href="https://log.rowanto.com/categories/optimistic-locking/index.xml" rel="self" type="application/rss+xml"/><item><title>Hibernate Soft Delete and Optimistic Locking Problem</title><link>https://log.rowanto.com/posts/hibernate-soft-delete-and-optimistic-locking-problem/</link><pubDate>Tue, 11 Feb 2014 11:00:00 +0000</pubDate><guid>https://log.rowanto.com/posts/hibernate-soft-delete-and-optimistic-locking-problem/</guid><description>
&lt;p&gt;Sometimes, in the database, we will want to not delete stuff because the data might still be needed later. Maybe some other process in the company will have to generate an invoice by the end of the month. That&amp;rsquo;s also one of the reason in my workplace, why there won&amp;rsquo;t be any hard delete in the database except when we&amp;rsquo;re sure it&amp;rsquo;s really necessary.&lt;/p&gt;
&lt;p&gt;One solution for this, in hibernate, is to overwrite the sql delete command using the @SqlDelete annotation:&lt;/p&gt;</description></item></channel></rss>