私のアプリケーションにhibernate、spring、strutsフレームワークを使用しています。Hibernate @Versionフィールドエラー
私のアプリケーションでは、各テーブルには、レコードの更新を追跡するためのバージョンという1つのフィールドがあります。
私はバージョン0を持っている私の国のテーブルの既存のレコードを更新していますたびに、それは1
に細かい&更新にレコード更新バージョンのフィールドに動作しますが、私はそのバージョン1レコードを更新しようとしている時はいつでも、それは次のようにエラーが表示されます:
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.sufalam.business.marketing.model.bean.Country] with identifier [3]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.company.business.marketing.model.bean.Country#3]
解決方法はありますか?
コードを投稿できますか? –