Skip to content

Instantly share code, notes, and snippets.

@RainerAtSpirit
Created September 19, 2012 12:46
Show Gist options
  • Save RainerAtSpirit/3749453 to your computer and use it in GitHub Desktop.
Save RainerAtSpirit/3749453 to your computer and use it in GitHub Desktop.
JayData 1.2 using SharePoint Odata provider throws error on MERGE
{
"error": {
"code": "", "message": {
"lang": "en-US", "value": "Error processing request stream. Error encountered in converting the value from request payload for property 'Owshiddenversion' to type 'Int32', which is the property's expected type. See inner exception for more detail."
}
}
}
MERGE https://spirit2013preview-b0204c96e901b7.sharepoint.com/sites/dev/ToDoSPhosted/_vti_bin/listdata.svc/Tasks(1) HTTP/1.1
Host: spirit2013preview-b0204c96e901b7.sharepoint.com
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Accept: application/atomsvc+xml;q=0.8, application/json;odata=verbose;q=0.5, */*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
If-Match: W/"1"
DataServiceVersion: 1.0
Content-Type: application/json; charset=UTF-8;odata=verbose
MaxDataServiceVersion: 2.0
Referer: https://spirit2013preview-b0204c96e901b7.sharepoint.com/sites/dev/ToDoSPhosted/index.html?SPHostUrl=https%3A%2F%2Fspirit2013preview%2Esharepoint%2Ecom%2Fsites%2Fdev&SPLanguage=en%2DUS&SPAppWebUrl=https%3A%2F%2FSpirit2013Preview%2Db0204c96e901b7%2Esharepoint%2Ecom%2Fsites%2Fdev%2FToDoSPhosted
Content-Length: 63
Cookie: rtFa=oywEWNjOH3rj1pfWXeW4AZznRf+Wim50L1wpLjmvPByhcXnKxUVTpsh53dJXA578Se8H9zGPr2/xZmNFoUHUH1aB2vSSNtw+dW1oxRxn7iZdRpLlHDgjUH5Db3zafhwbUb0+IBfkjvrzuRf1a92t6Rcfa1v8IcpFKCVz8anIswIMXDP/0qs9a9sVNbmfjnJTXpGeAc94M4bU96MwxF5qKSs7bv5R6dN/QmBaCwz1kvjZzUUpQ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2.utmcsr=login.microsoftonline.com|utmccn=(referral)|utmcmd=referral|utmcct=/login.srf; WSS_FullScreenMode=false; ASP.NET_SessionId=ua0tlxtdosiisinolfcj5azh; Ribbon.Read=1600459|-1|0|164190597; __utmb=123374793.2.10.1348057852
{"Id":1,"TaskName":"Updated via JayData","Owshiddenversion":""}
////////////////////////////////////////////////////////////////////////////////////////
////// Autogenerated by JaySvcUtil.exe http://JayData.org for more info /////////
////// oData v1 /////////
////////////////////////////////////////////////////////////////////////////////////////
(function (global, $data, undefined) {
function registerEdmTypes() {
function Edm_Boolean() { };
$data.Container.registerType('Edm.Boolean', Edm_Boolean);
$data.Container.mapType(Edm_Boolean, $data.Boolean);
function Edm_Binary() { };
$data.Container.registerType('Edm.Binary', Edm_Binary);
$data.Container.mapType(Edm_Binary, $data.Blob);
function Edm_DateTime() { };
$data.Container.registerType('Edm.DateTime', Edm_DateTime);
$data.Container.mapType(Edm_DateTime, $data.Date);
function Edm_DateTimeOffset() { };
$data.Container.registerType('Edm.DateTimeOffset', Edm_DateTimeOffset);
$data.Container.mapType(Edm_DateTimeOffset, $data.Integer);
function Edm_Time() { };
$data.Container.registerType('Edm.Time', Edm_Time);
$data.Container.mapType(Edm_Time, $data.Integer);
function Edm_Decimal() { };
$data.Container.registerType('Edm.Decimal', Edm_Decimal);
$data.Container.mapType(Edm_Decimal, $data.Number);
function Edm_Single() { };
$data.Container.registerType('Edm.Single', Edm_Single);
$data.Container.mapType(Edm_Single, $data.Number);
function Edm_Double() { };
$data.Container.registerType('Edm.Double', Edm_Double);
$data.Container.mapType(Edm_Double, $data.Number);
function Edm_Guid() { };
$data.Container.registerType('Edm.Guid', Edm_Guid);
$data.Container.mapType(Edm_Guid, $data.String);
function Edm_Int16() { };
$data.Container.registerType('Edm.Int16', Edm_Int16);
$data.Container.mapType(Edm_Int16, $data.Integer);
function Edm_Int32() { };
$data.Container.registerType('Edm.Int32', Edm_Int32);
$data.Container.mapType(Edm_Int32, $data.Integer);
function Edm_Int64() { };
$data.Container.registerType('Edm.Int64', Edm_Int64);
$data.Container.mapType(Edm_Int64, $data.Integer);
function Edm_Byte() { };
$data.Container.registerType('Edm.Byte', Edm_Byte);
$data.Container.mapType(Edm_Byte, $data.Integer);
function Edm_String() { };
$data.Container.registerType('Edm.String', Edm_String);
$data.Container.mapType(Edm_String, $data.String);
};
registerEdmTypes();
$data.Entity.extend('MyApp.DataService.AttachmentsItem', {
'EntitySet': { key: true, type: 'Edm.String', nullable: false, required: true },
'ItemId': { key: true, type: 'Edm.Int32', nullable: false, required: true },
'Name': { key: true, type: 'Edm.String', nullable: false, required: true }
});
$data.Entity.extend('MyApp.DataService.ComposedLooksItem', {
'Id': { key: true, type: 'Edm.Int32', nullable: false, required: true },
'ContentTypeID': { type: 'Edm.String', nullable: true },
'ContentType': { type: 'Edm.String', nullable: true },
'Title': { type: 'Edm.String', nullable: true },
'Modified': { type: 'Edm.DateTime', nullable: true },
'Created': { type: 'Edm.DateTime', nullable: true },
'CreatedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'CreatedById': { type: 'Edm.Int32', nullable: true },
'ModifiedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'ModifiedById': { type: 'Edm.Int32', nullable: true },
'Owshiddenversion': { type: 'Edm.Int32', nullable: true, concurrencyMode: $data.ConcurrencyMode.Fixed },
'Version': { type: 'Edm.String', nullable: true },
'Attachments': { type: 'Array', elementType: 'MyApp.DataService.AttachmentsItem', inverseProperty: '$$unbound' },
'Path': { type: 'Edm.String', nullable: true },
'Name': { type: 'Edm.String', nullable: true },
'MasterPageURL': { type: 'Edm.String', nullable: true },
'ThemeURL': { type: 'Edm.String', nullable: true },
'ImageURL': { type: 'Edm.String', nullable: true },
'FontSchemeURL': { type: 'Edm.String', nullable: true },
'DisplayOrder': { type: 'Edm.Double', nullable: true }
});
$data.Entity.extend('MyApp.DataService.MasterPageGalleryItem', {
'Id': { key: true, type: 'Edm.Int32', nullable: false, required: true },
'ContentTypeID': { type: 'Edm.String', nullable: true },
'ContentType': { type: 'Edm.String', nullable: true },
'Created': { type: 'Edm.DateTime', nullable: true },
'CreatedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'CreatedById': { type: 'Edm.Int32', nullable: true },
'Modified': { type: 'Edm.DateTime', nullable: true },
'ModifiedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'ModifiedById': { type: 'Edm.Int32', nullable: true },
'CopySource': { type: 'Edm.String', nullable: true },
'ApprovalStatus': { type: 'Edm.String', nullable: true },
'Path': { type: 'Edm.String', nullable: true },
'CheckedOutTo': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'CheckedOutToId': { type: 'Edm.Int32', nullable: true },
'Name': { type: 'Edm.String', nullable: true },
'VirusStatus': { type: 'Edm.String', nullable: true },
'IsCurrentVersion': { type: 'Edm.Boolean', nullable: true },
'Owshiddenversion': { type: 'Edm.Int32', nullable: true, concurrencyMode: $data.ConcurrencyMode.Fixed },
'Version': { type: 'Edm.String', nullable: true },
'Description': { type: 'Edm.String', nullable: true },
'CompatibleUIVersionS': { type: 'Array', elementType: 'MyApp.DataService.MasterPageGalleryCompatibleUIVersionSValue', inverseProperty: '$$unbound' },
'DefaultCSSFile': { type: 'Edm.String', nullable: true },
'Hidden': { type: 'Edm.Boolean', nullable: true },
'TargetControlType': { type: 'MyApp.DataService.MasterPageGalleryTargetControlTypeValue', inverseProperty: '$$unbound' },
'TargetControlTypeValue': { type: 'Edm.String', nullable: true },
'Icon': { type: 'Edm.String', nullable: true },
'Standalone': { type: 'MyApp.DataService.MasterPageGalleryStandaloneValue', inverseProperty: '$$unbound' },
'StandaloneValue': { type: 'Edm.String', nullable: true },
'TargetScope': { type: 'Edm.String', nullable: true },
'TargetListTemplateID': { type: 'Edm.String', nullable: true }
});
$data.Entity.extend('MyApp.DataService.MasterPageGalleryCompatibleUIVersionSValue', {
'Value': { key: true, type: 'Edm.String', nullable: false, required: true }
});
$data.Entity.extend('MyApp.DataService.MasterPageGalleryStandaloneValue', {
'Value': { key: true, type: 'Edm.String', nullable: false, required: true }
});
$data.Entity.extend('MyApp.DataService.MasterPageGalleryTargetControlTypeValue', {
'Value': { key: true, type: 'Edm.String', nullable: false, required: true }
});
$data.Entity.extend('MyApp.DataService.TasksItem', {
'Id': { key: true, type: 'Edm.Int32', nullable: false, required: true },
'ContentTypeID': { type: 'Edm.String', nullable: true },
'ContentType': { type: 'Edm.String', nullable: true },
'TaskName': { type: 'Edm.String', nullable: true },
'Modified': { type: 'Edm.DateTime', nullable: true },
'Created': { type: 'Edm.DateTime', nullable: true },
'CreatedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'CreatedById': { type: 'Edm.Int32', nullable: true },
'ModifiedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'ModifiedById': { type: 'Edm.Int32', nullable: true },
'Owshiddenversion': { type: 'Edm.Int32', nullable: true, concurrencyMode: $data.ConcurrencyMode.Fixed },
'Version': { type: 'Edm.String', nullable: true },
'Attachments': { type: 'Array', elementType: 'MyApp.DataService.AttachmentsItem', inverseProperty: '$$unbound' },
'Path': { type: 'Edm.String', nullable: true },
'Predecessors': { type: 'Array', elementType: 'MyApp.DataService.TasksItem', inverseProperty: '$$unbound' },
'Priority': { type: 'MyApp.DataService.TasksPriorityValue', inverseProperty: '$$unbound' },
'PriorityValue': { type: 'Edm.String', nullable: true },
'TaskStatus': { type: 'MyApp.DataService.TasksTaskStatusValue', inverseProperty: '$$unbound' },
'TaskStatusValue': { type: 'Edm.String', nullable: true },
'Complete': { type: 'Edm.Double', nullable: true },
'AssignedTo': { type: 'Array', elementType: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'Description': { type: 'Edm.String', nullable: true },
'StartDate': { type: 'Edm.DateTime', nullable: true },
'DueDate': { type: 'Edm.DateTime', nullable: true },
'Completed': { type: 'Edm.Boolean', nullable: true }
});
$data.Entity.extend('MyApp.DataService.TasksPriorityValue', {
'Value': { key: true, type: 'Edm.String', nullable: false, required: true }
});
$data.Entity.extend('MyApp.DataService.TasksTaskStatusValue', {
'Value': { key: true, type: 'Edm.String', nullable: false, required: true }
});
$data.Entity.extend('MyApp.DataService.UserInformationListItem', {
'ContentTypeID': { type: 'Edm.String', nullable: true },
'Name': { type: 'Edm.String', nullable: true },
'Account': { type: 'Edm.String', nullable: true },
'WorkEmail': { type: 'Edm.String', nullable: true },
'MobilePhone': { type: 'Edm.String', nullable: true },
'AboutMe': { type: 'Edm.String', nullable: true },
'SIPAddress': { type: 'Edm.String', nullable: true },
'IsSiteAdmin': { type: 'Edm.Boolean', nullable: true },
'Deleted': { type: 'Edm.Boolean', nullable: true },
'Hidden': { type: 'Edm.Boolean', nullable: true },
'Picture': { type: 'Edm.String', nullable: true },
'Department': { type: 'Edm.String', nullable: true },
'Title': { type: 'Edm.String', nullable: true },
'FirstName': { type: 'Edm.String', nullable: true },
'LastName': { type: 'Edm.String', nullable: true },
'WorkPhone': { type: 'Edm.String', nullable: true },
'UserName': { type: 'Edm.String', nullable: true },
'WebSite': { type: 'Edm.String', nullable: true },
'AskMeAbout': { type: 'Edm.String', nullable: true },
'Office': { type: 'Edm.String', nullable: true },
'Id': { key: true, type: 'Edm.Int32', nullable: false, required: true },
'ContentType': { type: 'Edm.String', nullable: true },
'Modified': { type: 'Edm.DateTime', nullable: true },
'Created': { type: 'Edm.DateTime', nullable: true },
'CreatedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'CreatedById': { type: 'Edm.Int32', nullable: true },
'ModifiedBy': { type: 'MyApp.DataService.UserInformationListItem', inverseProperty: '$$unbound' },
'ModifiedById': { type: 'Edm.Int32', nullable: true },
'Owshiddenversion': { type: 'Edm.Int32', nullable: true, concurrencyMode: $data.ConcurrencyMode.Fixed },
'Version': { type: 'Edm.String', nullable: true },
'Attachments': { type: 'Array', elementType: 'MyApp.DataService.AttachmentsItem', inverseProperty: '$$unbound' },
'Path': { type: 'Edm.String', nullable: true }
});
$data.EntityContext.extend('MyApp.DataContext', {
Attachments: { type: $data.EntitySet, elementType: MyApp.DataService.AttachmentsItem },
ComposedLooks: { type: $data.EntitySet, elementType: MyApp.DataService.ComposedLooksItem },
MasterPageGallery: { type: $data.EntitySet, elementType: MyApp.DataService.MasterPageGalleryItem },
MasterPageGalleryCompatibleUIVersionS: { type: $data.EntitySet, elementType: MyApp.DataService.MasterPageGalleryCompatibleUIVersionSValue },
MasterPageGalleryStandalone: { type: $data.EntitySet, elementType: MyApp.DataService.MasterPageGalleryStandaloneValue },
MasterPageGalleryTargetControlType: { type: $data.EntitySet, elementType: MyApp.DataService.MasterPageGalleryTargetControlTypeValue },
Tasks: { type: $data.EntitySet, elementType: MyApp.DataService.TasksItem },
TasksPriority: { type: $data.EntitySet, elementType: MyApp.DataService.TasksPriorityValue },
TasksTaskStatus: { type: $data.EntitySet, elementType: MyApp.DataService.TasksTaskStatusValue },
UserInformationList: { type: $data.EntitySet, elementType: MyApp.DataService.UserInformationListItem },
ConvertListTitleToEntitySetName: $data.EntityContext.generateServiceOperation({
serviceName: 'ConvertListTitleToEntitySetName', returnType:
'Edm.String'
, params: [
{ listTitle: 'Edm.String' }], method: 'GET'
})
});
// MyApp.context = new MyApp.DataContext({ name: 'oData', oDataServiceHost: 'ToDo-SP-Hosted.xml' });
})(window, $data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment