Azure Mobile Services - Notes of Soft Delete feature
来源:互联网 发布:淘客助手有mac版插件吗 编辑:程序博客网 时间:2024/04/29 18:00
How to use Soft Delete feature: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-using-soft-delete/
Some of the potential benefits of using soft delete:
- When using the Offline data Sync for Mobile Services feature, the client SDK automatically queries for deleted records and removes them from the local database. Without soft delete enabled, you need to write additional code on the backend so that the client SDK knows which records to remove from the local store. Otherwise, the client local store and backend will be inconsistent with regard to these deleted records and the client method
PurgeAsync()
must be called to clear the local store. - Some applications have a business requirement to never physically delete data, or to delete data only after it has been audited. The soft delete feature can be useful in this scenario.
- Soft delete can be used to implement an "undelete" feature, so that data deleted by accident can be recovered. However, soft deleted records take up space in the database, so you should consider creating a scheduled job to periodically hard delete the soft deleted records. For an example of this, see [Using soft delete with the .NET backend] and [Using soft delete with the JavaScript backend]. Your client code should also periodically call
PurgeAsync()
so that these hard deleted records do not remain in the device's local data store.
Notes:
Soft Delete only works with tables have id of type of "string", otherwise
1. the records will be permantely deleted on calling the delete method from the Mobile Service Client SDK
2. and you'll see an error like "xxx has an integer id member and therefore can not have any members with the system property attribute 'Deleted' " if you add [Deleted] attribute on your mobile app local model when syncing offline data with mobile services.
3. With a table with soft delete (id is type of string and has __deleted (bit) column) enabled, we tried disable soft delete by deleting the __deleted field, but found the query against the table won't work, after added the __deleted back. the query works again
- Azure Mobile Services - Notes of Soft Delete feature
- LINK - Windows Azure Mobile Services
- LINK - Azure Mobile Services - custom API
- LINK - Azure Mobile Services - Custom Bulk Insert Javascript API
- xamarin.forms保存数据和推送通知Azure Mobile Services
- Secrets of Mobile Network Performance Reading Notes
- Mobile Service - Get total count of an Azure table
- 微软推出移动端的云服务Windows Azure Mobile Services
- Azure Services Platform
- Django soft-delete软删除
- Android Notes 00 - Services
- MT6628_MT6620如何禁止soft-mute feature
- Study notes for Feature Engineering
- C ++ 11 New Feature Notes
- Windows Azure Mobile Services增加了对 Android的支持并扩展其适用范围至东亚地区
- 公布Windows Azure Media Services
- Delete Windows Services
- windows mobile 6 feature diagram
- Uboot优美代码赏析1:目录结构和malkefile分析
- 数学领域的函数的递归函数
- VC编写程序在debug下正常,在release下错误
- Android中Spinner下拉列表(使用ArrayAdapter和自定义Adapter实现)
- 唐骏在北邮的演讲~爆笑~不愧是年薪十亿的人才
- Azure Mobile Services - Notes of Soft Delete feature
- JqGrid 添加信息时某字段自动选择器
- 上传AppStore关于.geojson文件的配置
- java LockSupport
- crontab在Ubuntu下的使用
- VS2012下基于Glut glRotatef glTranslatef示例程序
- sql的索引:网上看到不错,整理成自己的东西
- SharePoint 2013 Feature Details
- PHP微信二维码开发HttpCode非200 V3版