开发者社区> 问答> 正文

model.save()报错The attribute name is not ?报错

@JFinal 你好,想跟你请教个问题:我的表里面没有id字段,有个uid主键,自增。在使用.save()的时候,就报错:The attribute name is not exists: id。请问这是怎么回事呢》?

展开
收起
爱吃鱼的程序员 2020-06-22 15:00:14 381 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    引用来自“RobertCool”的答案

    主键名需要为id,或者在Config类中设置表主键名称+1,多谢了,又学到了。+1主键名需要为id,或者在Config类中设置表主键名称

    nameisnotexists

    ....

    2020-06-22 15:00:30
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
A Developer’s View into Spark\'s Memory Model 立即下载
AutoAlerts-From Data to Action 立即下载
OPEN SOURCE IN A DATA-DRIVEN WORLD 立即下载