commit
317f59e257
@ -811,7 +811,7 @@ db.Model(&user).Update(<span class="hljs-string">"CreatedAt"</span
|
||||
db.Model(&user).Update(<span class="hljs-string">"name"</span>, <span class="hljs-string">"jinzhu"</span>) <span class="hljs-comment">// will set `UpdatedAt` to current time</span>
|
||||
</code></pre>
|
||||
<h3 id="use-deletedat-to-store-records-deleted-time-if-field-exists">Use <code>DeletedAt</code> to store record's deleted time if field exists</h3>
|
||||
<p>Delete records having <code>DeletedAt</code> field, it won't be deleted from database, but only set field <code>DeletedAt</code>'s value to current time, and the record is not findable when querying, refer <a href="curd.html#soft-delete">Soft Delete</a></p>
|
||||
<p>Delete records having <code>DeletedAt</code> field, it won't be deleted from database, but only set field <code>DeletedAt</code>'s value to current time, and the record is not findable when querying, refer <a href="crud.html#soft-delete">Soft Delete</a></p>
|
||||
|
||||
|
||||
</section>
|
||||
|
Loading…
x
Reference in New Issue
Block a user