Titanium Appcelerator-config.adapter.idAttribute“;id";在表iOS 11的列列表中找不到
我束手无策。我有一个适用于iOS和Android的Appcelerator应用程序。它使用合金模型。我无法在iOS 11上运行这个 当在iOS 11中的iPhone7模拟器中构建和启动应用程序时,我在应用程序启动时遇到以下错误Titanium Appcelerator-config.adapter.idAttribute“;id";在表iOS 11的列列表中找不到,titanium,appcelerator,ios11,Titanium,Appcelerator,Ios11,我束手无策。我有一个适用于iOS和Android的Appcelerator应用程序。它使用合金模型。我无法在iOS 11上运行这个 当在iOS 11中的iPhone7模拟器中构建和启动应用程序时,我在应用程序启动时遇到以下错误 [DEBUG] : Installing sql database "db.sql" with name "db" [INFO] : [LiveView] Error Evaluating /alloy/models/Receive.js @ Line: <n
[DEBUG] : Installing sql database "db.sql" with name "db"
[INFO] : [LiveView] Error Evaluating /alloy/models/Receive.js @ Line: <null>
[ERROR] : config.adapter.idAttribute "id" not found in list of columns for table "receive"
[ERROR] : columns: []
[ERROR] : File: /alloy/models/Receive.js
[ERROR] : Line: <null>
[ERROR] : SourceId: <null>
[ERROR] : Backtrace:
[ERROR] : undefined
[INFO] : [LiveView] Error Evaluating app.js @ Line: 240
[ERROR] : TypeError: undefined is not a constructor (evaluating 'new (require("/alloy/models/" + ucfirst(name)).Collection)(args)')
[ERROR] : File: app.js
[ERROR] : Line: 240
[ERROR] : SourceId: <null>
[ERROR] : Backtrace:
[ERROR] : undefined
[DEBUG] : Application booted in 835.013032 ms
[TRACE] : Uploaded tiapp metadata with Appcelerator Platform!
当我删除适配器对象中所有模型的idAttribute键时,它在iOS 11中生成并运行,但由于某种原因,我的获取查询失败,因为我正在获取具有id的项
我使用的是Appcelerator的最新版本,我已经将Tianium SDK更新为最新版本(6.2.2.GA)
错误是告诉我,应用程序以某种方式将我的列对象视为空。。。。但显然不是
希望你们有答案 为什么要删除
idAttribute
属性?如果不指定它,它将默认为alloy\u id
,我知道,但我需要id作为idAttribute;但是设置了该设置后,我的应用程序将无法在iOS 11中启动……为什么要删除idAttribute
属性?如果不指定它,它将默认为alloy\u id
我知道,但我需要id作为idAttribute;但是有了这个设置,我的应用程序就不能在iOS 11中启动了。。。。
exports.definition = {
config: {
"columns": {
"id" : "INTEGER PRIMARY KEY AUTOINCREMENT",
"lev_naam" : "TEXT",
"product" : "TEXT",
"state" : "INTEGER",
"type" : "TEXT",
"subtype" : "TEXT",
"temp" : "TEXT",
"packing" : "INTEGER",
"freshness" : "INTEGER",
"tht" : "INTEGER",
"description" : "TEXT",
"check_date" : "INTEGER",
"check_week" : "INTEGER",
"check_year" : "INTEGER",
"creation_date" : "INTEGER",
"update_date" : "INTEGER",
"username" : "TEXT",
"location" : "TEXT",
"db_id" : "INTEGER",
"issend" : "INTEGER",
"isdeleted" : "INTEGER",
"uid" : "TEXT",
},
"defaults": {
"lev_naam" : "",
"product" : "",
"state" : -1,
"type" : "",
"subtype" : "",
"temp" : null,
"packing" : null,
"freshness" : null,
"tht" : null,
"description" : "",
"check_date" : null,
"check_week" : null,
"check_year" : null,
"creation_date" : 0,
"update_date" : 0,
"username" : null,
"isdeleted" : null,
"issend" : null,
"db_id" : null,
"uid" : null,
},
"adapter": {
"db_file" : 'db.sql',
"type": "sql",
"collection_name": "receive",
"idAttribute": "id",
}
},
(.... rest of code)