i work on jaydata release 1.3.6 (with odata v3) , have problem service operations , actions, submitted wia method instead of post...
i have change post because of $filter request big request (limit string length).
i've tried many possibilities :
$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 meant have method action post default, it's in get, if manually set method serviceoperation method parameter ignored...
i've set .net odata controller 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 problem implementation of jaydata?
thanks advices !
i found solution have service action , service operation pass post method :
when saw this: http://jaydata.org/blog/odata-cookbook-with-jaydata#h3_2
i saw dynamic context creation ignore post method when parse edm $metadata first time ...
the first thing static initialize context this:
var context = new nortwindcontext({ name: 'odata', odataservicehost: 'http://localhost:50538/examples/northwind.svc' }); context.onready(function () { // work data });
but jaydata not post $filter , other $top query conventions, it's allways in querystring.
how solve problem of maximum length in jaydata odata v3 ? don't know yet... if can me...
Comments
Post a Comment