2013-10-07 29 views
0

我使用WCF數據服務,當我嘗試保存實體時,出現錯誤__stringStartsWith is undefined。它引發了第215行文件breeze.dataService.odata.js中的異常。breezejs:__stringStartsWith在使用ODATA適配器時未定義

我在頁面中包含了breeze.debug.js和breeze.dataService.odata.js。該函數在breeze.debug.js中被定義爲一個全局函數,所以我猜它應該被dataService適配器所知...有什麼我在這裏失蹤了嗎?

編輯

客戶端: https://www.dropbox.com/s/ed0o7ie1n88pnlw/reprobreezee_client.zip

服務: https://www.dropbox.com/s/vnye10lcgg4h3iu/reprobreeze_service.zip

+0

對不起,需要更多的信息。 –

+0

我明白了。我把一個repro放在一起。有兩個拉鍊。一個用於ODATA服務,另一個用於js客戶端(只需瀏覽到/app/index.html。請注意,微風版本是使用本文中建議的修復修改的:http://stackoverflow.com/questions/18513334/breezejs -calling-savecchanges-FOR-A-經典的OData服務,失敗 – Sam

回答

1

__stringStartsWithbreeze.dataService.odata.js文件試圖插入一條記錄時是undefined有同樣的問題。

更改代碼

if (__stringStartsWith(uri,prefix)) ... 

if (core.stringStartsWith(uri, prefix)) ...