SQLITE_ERROR - table sap_capire_bookshop_books has no column named currency
在做 SAP Cloud Application Programming 練習時,遇到如下的錯誤消息:
SQLITE_ERROR: table sap_capire_bookshop_books has no column named currency
在我的 schema 定義里,Books entity 里確實存在一個叫做 currency 的字段,但其數(shù)據(jù)類型為 Currency,來自 @sap/cds/common,而非 built-in 數(shù)據(jù)類型比如 Integer,String,Decimal等等。
然而通過 csv 文件導入數(shù)據(jù)到 sqlite in memory 數(shù)據(jù)庫時,卻遇到了本文標題描述的錯誤消息。
這里有個竅門,訪問 url:
http://localhost:4004/browse/Books?$top=11
發(fā)現(xiàn)Books entity的currency字段,其對應(yīng)的數(shù)據(jù)庫字段名稱應(yīng)該為 currency_code, 而非 currency:
在 csv 文件里將字段名改為 currency_code, 錯誤消失:
更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:
總結(jié)
以上是生活随笔為你收集整理的SQLITE_ERROR - table sap_capire_bookshop_books has no column named currency的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 图集谷-写真集-爬虫-2.1「建议收藏」
- 下一篇: 使用 Visual Studio Cod