---
title: "Grails ORM id generator in Oracle"
author: "boogie"
date: "2008-06-14T20:18:53Z"
tags: []
slug: "grails-orm-id-generator-in-oracle"
draft: false
lastmod: "2008-06-14T20:18:53Z"
id: 203306
url: "https://boogie.iteye.com/blog/203306"
---

默认自动建立名称为HIBERNATE\_SEQUENCE的sequence，可以在domain里用以下方法指定：

 

    static mapping = {  
        id generator: 'sequence', params: \[sequence: 'seq\_name']  
    }