@interface InfoModel : JSONModel
@property ( nonatomic , copy ) NSString *name;
@property ( nonatomic , copy ) NSString *age;
@property ( nonatomic , copy ) NSString *sex;
@property ( nonatomic , copy ) NSString *vid;
@end
#import "InfoModel.h"
@implementation InfoModel
// DB
// 修改 主键
+( NSString *)getPrimaryKey
{
return @"vid" ;
}
// 表名
+( NSString *)getTableName
{
return @"InfoModel" ;
}
// 表版本
+( int )getTableVersion
{
return 1 ;
}
@end
使用LKDBHelper 插入相同id时候应该是更新数据而不是插入新的数据
标签:
查看更多关于使用LKDBHelper 插入相同id时候应该是更新数据而不是插入新的数据的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did118856