Soft inserts are now the default,i.e. AutoInc columns are automatically skipped when inserting with +=,++=,insert and insertAll. This means that you no longer need separate projections (without the primary key) for inserts.
但是,不得更新2.x文档:
While some database systems allow inserting proper values into AutoInc columns or inserting None to get a created value,most databases forbid this behaviour,so you have to make sure to omit these columns. Slick does not yet have a feature to do this automatically but it is planned for a future release. For now,you have to use a query with a custom projection which does not include the AutoInc column
有没有人知道使用AutoInc插入表中的新2.0语法并获取生成的密钥?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。