我正在使用slick2.0.1(如果需要可以升级),我希望从数据库(postgresql)中检索自动递增值。def autoInc = name ~ price ~ description returning id
我选择的方式是让我的模型poso (普通的旧scala对象):
case class Product(....
我使用FluentORM层作为Oracle10g数据库的NHibernate层,并使用before insert触发器在插入记录时创建惟一的id (带有序列)。-- Within the trigger代码中的id属性是一个长的(Int64),不能将其更改为十进制我将其映射为:
this.Id(x =&