I work on the Jaydata release 1.3.6 (with OData V3) and i have a problem with Service Operations and Actions, they are all submitted wia the GET method instead of POST...
I have to change GET to POST because of my $filter request which is to big for a GET request (limit string length).
I've tried many possibilities like :
$data.EntityContext.extend('Default.Container', {
'Items': { type: $data.EntitySet, elementType: Entities.Item, method: 'POST' },
'GetItemsAction': { type: $data.ServiceAction, returnType: $data.Queryable, elementType: 'Entities.Item', 'EntitySet': 'Item', params: [] },
'GetItemsOperation': { type: $data.ServiceOperation, returnType: $data.Queryable, elementType: 'Entities.Item', 'EntitySet': 'Item', params: [], method: 'POST' }
});
The Service Action is meant to have the method action to POST by default, but it's always in GET, even if I manually set the method for a ServiceOperation the method parameter is ignored...
I've set a .Net OData Controller with my methods in POST:
[EnableQuery]
public IQueryable<Item> Get(ODataQueryOptions<Item> options)
{
return this._itemRepository.GetAll();
}
[HttpPost]
[EnableQuery]
public IQueryable<Item> GetItemsAction(ODataQueryOptions<Item> options)
{
return this._itemRepository.GetAll();
}
[HttpPost]
[EnableQuery]
public IQueryable<Item> GetItemsOperation(ODataQueryOptions<Item> options)
{
return this._itemRepository.GetAll();
}
Is there a problem with the implementation of Jaydata?
Thanks for your advices !