假設我有:使用Play Framework的Anorm,我如何獲得自動生成的id爲插入?
case class SomeModel(
id : Pk[Long],
description : String
)
object SomeModel extends Magic[SomeModel] {
def ayDogAy = {
var aydog = SomeModel(NotAssigned, "aydog")
this.insert(aydog)
}
}
如何找回aydog的插入ID?
如果它的事項,我支持的數據庫是Postgres的