---
title: "grails 1.1  Gorm 部分新特性提前知道"
author: "dellsoft"
date: "2008-10-30T17:21:48Z"
tags: []
slug: "grails-1-1-gorm"
draft: false
lastmod: "2008-10-30T17:21:48Z"
id: 260176
url: "https://dellsoft.iteye.com/blog/260176"
---

说明：grails 1.1部分新特性，我只是看 grails 的fisheye 代码链接到的jira 看到的

 

具：nabble forum 消息：grails 1.1beta1 将会在 11月下旬发布，beta2版本计划 12月底，rc正式版本要到 2009-1月份

 

1）支持 hibernate 的dynaimc-update 就是只对修改过的数据进行更新，通过下面方法

```
static mapping = {


     dynamicUpdate true


     dynamicInsert true


} 
```

 

2）对集合的支持 http://jira.codehaus.org/browse/GRAILS-1023

```
class Person {


    static  hasMany = [nicknames:String

]


}
```

 

GORM now supports basic collection types using a join table:

```
person_id 	string
1 	"joejoe"
1 	"yoyo"
```

 

 

Grails will map a new join table called "person\_nicknames":

You can change the mapping using the joinTable argument:

```
class Person {
    static hasMany = [nicknames:String]

    static mapping = {
       hasMany joinTable:[name:'bunch_o_nicknames', key:'person_id', column:'nickname', type:"text"]       
    } 
}
```