Skip to content

Commit

Permalink
fix(sql): last_modified_at should be updated when a record is deleted
Browse files Browse the repository at this point in the history
This ensures that `getLastModified()` returns the correct timestamp
when triggered a collection refresh.
  • Loading branch information
ajordens committed Jul 8, 2019
1 parent c91895a commit 56c9723
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class SqlStorageService(
ctx
.update(table(definitionsByType[objectType]!!.tableName))
.set(DSL.field("is_deleted", Boolean::class.java), true)
.set(DSL.field("last_modified_at", Long::class.java), clock.millis())
.where(DSL.field("id", String::class.java).eq(objectKey))
.execute()
} else {
Expand Down

0 comments on commit 56c9723

Please sign in to comment.