enable optimistic locking for m_loan
This commit is contained in:
+4
@@ -35,6 +35,7 @@ import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.Transient;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
import javax.persistence.Version;
|
||||
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -118,6 +119,9 @@ import com.google.gson.JsonPrimitive;
|
||||
@UniqueConstraint(columnNames = { "external_id" }, name = "loan_externalid_UNIQUE") })
|
||||
public class Loan extends AbstractPersistable<Long> {
|
||||
|
||||
@Version
|
||||
int version;
|
||||
|
||||
@Column(name = "account_no", length = 20, unique = true, nullable = false)
|
||||
private String accountNumber;
|
||||
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `version` INT(15) NOT NULL DEFAULT '1' AFTER `create_standing_instruction_at_disbursement`;
|
||||
Reference in New Issue
Block a user