Azure移动服务Android离线示例-"createdAt","updatedAt"列为空 [英] Azure Mobile Services Android Offline Example - "createdAt","updatedAt" columns empty
问题描述
在未看到任何代码的情况下,我假设您尚未用相应的注释修饰CreatedAt和UpdatedAt属性.确保您的媒体资源看起来像这样并且可以正常工作:
[Microsoft.WindowsAzure.MobileServices.CreatedAt]公共DateTimeOffset?CreatedAt {get;放;}[Microsoft.WindowsAzure.MobileServices.UpdatedAt]公共DateTimeOffset?UpdatedAt {get;放;}
Ps.您不必在不使用它们的情况下添加这些列.
i have added in the ToDoItem table of the local DB of the mobile device the columns "createdAt" and "updatedAt", because they also exist in the Azure Database ToDoItem table. Those columns are never updated in the localstorage table although i refresh the list (the other table columns are updated normally). Why could this happen? The example i followed is here: http://azure.microsoft.com/blog/2014/08/07/offline-support-in-azure-mobile-services-android-sdk/
Thank you
Without having seen any of your code I assume you haven't decorated the CreatedAt and UpdatedAt properties with the corresponding annotations. Make sure your properties look like this and it should work:
[Microsoft.WindowsAzure.MobileServices.CreatedAt]
public DateTimeOffset? CreatedAt { get; set; }
[Microsoft.WindowsAzure.MobileServices.UpdatedAt]
public DateTimeOffset? UpdatedAt { get; set; }
Ps. you don't have to add these columns of your aren't using them.
这篇关于Azure移动服务Android离线示例-"createdAt","updatedAt"列为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!