refactor: clear the deprecated attributes value of post content when prePersist and preUpdate (#1797)

pull/1804/head
guqing 2022-03-31 19:52:27 +08:00 committed by GitHub
parent ec6df79e7a
commit 7d9da09b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -243,6 +243,17 @@ public class BasePost extends BaseEntity {
if (version == null || version < 0) {
version = 1;
}
// Clear the value of the deprecated attributes
this.originalContent = "";
this.formatContent = "";
}
@Override
protected void preUpdate() {
super.preUpdate();
// Clear the value of the deprecated attributes
this.originalContent = "";
this.formatContent = "";
}
/**