Open englertm opened 9 years ago
It's not only a problem with the extension '$format=json', it's every time when I want ja JSON response for a collection that is not at the first level. If the HTTP header is set to 'Accept: application/json' then the odata service returns also no items when I do a GET request at the item table: http://localhost:52999/odata/asb/einsatz.svc/Einsaetze('NTU2ZGM3NDljNTZiY2NjNDE0NGQ3ODNk')/EinsatzkraftSet
I created a openUI5 application that uses this ODATA service, openUI5 sets automatically the header 'Accept: application/json', so I receive no data. I can't use this Jaydata ODATA service for a OpenUI5 application.
Does anyone have a solution for this?
Thank you, Marcus
Hi,
I built an odata service with a header- ("Einsatz") and an item table ("EinsatzkraftSet") using node.js with modules jaydata 1.3.6, express 3.20.3 and mongodb 1.4.38
The ODATA-Service itself is working, when I call the URL http://localhost:52999/odata/asb/einsatz.svc/Einsaetze then I receive the header data
The URL http://localhost:52999/odata/asb/einsatz.svc/Einsaetze?$format=json delivers me the same entry:
So far so good, now when I call the URL for the item table ("EinsatzkraftSet"), I receive one entry: http://localhost:52999/odata/asb/einsatz.svc/Einsaetze('NTU2ZGM3NDljNTZiY2NjNDE0NGQ3ODNk')/EinsatzkraftSet
BUT when I call this URL with extension $format=json I receive no entries!!! http://localhost:52999/odata/asb/einsatz.svc/Einsaetze('NTU2ZGM3NDljNTZiY2NjNDE0NGQ3ODNk')/EinsatzkraftSet?$format=json:
My workaround is to call the header URL with $expand for the item table "EinsatzkraftSet" http://localhost:52999/odata/asb/einsatz.svc/Einsaetze('NTU2ZGM3NDljNTZiY2NjNDE0NGQ3ODNk')?$format=json&$expand=EinsatzkraftSet
Is it a bug in jaydata?
Marcus
Here's my code:
einsatz_model.js: