li6185377 / LKDBHelper-SQLite-ORM

全自动的插入,查询,更新,删除, an automatic database operation thread-safe and not afraid of recursive deadlock
MIT License
1.21k stars 288 forks source link

在swift中使用saveToDb报如下错误 #160

Open deng690990 opened 2 years ago

deng690990 commented 2 years ago

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
li6185377 commented 2 years ago

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

deng690990 commented 2 years ago

我是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 commented 2 years ago

@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: @.***>

li6185377 commented 2 years ago

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

deng690990 commented 2 years ago

@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: @.***>