Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
类 Ctr_country {
String ctr_name String ctr_abrev String toString(){ ctr_abrev } }
我使用 SQLS Express 作为数据库。我希望这个类(表)的主键是 ctr_abrev。
a) 我该怎么做?
static mapping = { id generator:'assigned', name:'ctr_abrev' }
Grails 文档 GORM id