Hi,
we are facing the same problem. Using bindElement() to set the context for an oData model results in a TypeError.
The oData call itself is triggered and successful. The crash happens in the ODataModel code:
Uncaught TypeError: Cannot read property 'uri' of undefined ODataModel-dbg.js:781
sap.ui.model.odata.ODataModel._getKey ODataModel-dbg.js:781
(anonymous function) ODataModel-dbg.js:637
_handleSuccess ODataModel-dbg.js:349
(anonymous function) datajs-dbg.js:1615
odata.defaultHttpClient.request.requestCallback
The __getKey function gets called multiple times after the oData call. The error happens when the oEvent parameter has the oData objects nested inside an array results. I looked at the call stack to see when this function is called. It all looks reasoable to me.
The problem seems to be the usage of __getKey within the success handler created in sap.ui.model.odata.ODataModel.prototype.createBindingContex().
Is there anyone who can help?
Best regards,
Sebastian