LKDBHelper-SQLite-ORM icon indicating copy to clipboard operation
LKDBHelper-SQLite-ORM copied to clipboard

在swift中使用saveToDb报如下错误

Open deng690990 opened this issue 3 years ago • 6 comments

2022-02-19 09:52:48.930003+0800 Test[92335:9227843] #LKDBHelper ERROR: -[LKDBHelper(DatabaseExecute) insertBase:]_block_invoke [Line 1285] sql:replace into Test.SFUserModel(schoolId,appNameLogo,nick,scope,startStudy,code,platform,memberId,username,iconUrl,messageCount) values(?,?,?,?,?,?,?,?,?,?,?) args: ( "51b68f962e7811e895fe02420a183a07", "", "嘿看看", "", "0", "", "", "5ccf2df8f7cb11eab966fa163e73eb62", "", , "0", ) sqlite error :no such table: Test.SFUserModel

deng690990 avatar Feb 19 '22 01:02 deng690990

还未创建表,是不是你版本比较低?好几年前已经会自动创建表了

li6185377 avatar Mar 17 '22 09:03 li6185377

我是pod 最新的版本,LKDBHelper @.***,请问是不是swift中要存储的对象还需要单独做什么处理呢

------------------ 原始邮件 ------------------ 发件人: "li6185377/LKDBHelper-SQLite-ORM" @.>; 发送时间: 2022年3月17日(星期四) 下午5:45 @.>; @.@.>; 主题: Re: [li6185377/LKDBHelper-SQLite-ORM] 在swift中使用saveToDb报如下错误 (Issue #160)

还未创建表,是不是你版本比较低?好几年前已经会自动创建表了

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

deng690990 avatar Mar 17 '22 10:03 deng690990

@objcMembers,我pod的版本是2.5.7,应该是最新的

------------------ 原始邮件 ------------------ 发件人: "li6185377/LKDBHelper-SQLite-ORM" @.>; 发送时间: 2022年3月17日(星期四) 下午5:45 @.>; @.@.>; 主题: Re: [li6185377/LKDBHelper-SQLite-ORM] 在swift中使用saveToDb报如下错误 (Issue #160)

Closed #160.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

deng690990 avatar Mar 17 '22 10:03 deng690990

Swift Model 要继承 NSObject, 核心还是靠 OC runtime 的

li6185377 avatar Mar 17 '22 10:03 li6185377

@objcMembers

class SFUserModel: NSObject, HandyJSON {

我是继承自nsobject写的

------------------ 原始邮件 ------------------ 发件人: "li6185377/LKDBHelper-SQLite-ORM" @.>; 发送时间: 2022年3月17日(星期四) 晚上6:45 @.>; @.@.>; 主题: Re: [li6185377/LKDBHelper-SQLite-ORM] 在swift中使用saveToDb报如下错误 (Issue #160)

Swift Model 要继承 NSObject, 核心还是靠 OC runtime 的

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

deng690990 avatar Mar 17 '22 10:03 deng690990