0

次のドメイン クラスを定義しました。

class Content {

  Map i18nDescription = [:]
  ...

}

次のコードを実行する場合

content.i18nDescription['it'] = "desc desc...."
content.save()

次のエラーが表示されます。

util.JDBCExceptionReporter ERROR: value too long for type character varying(255)

(私はpostgresをデータベースとして使用しています)

i18nDescription['it']を使用してデータベースのフィールドのサイズを増やすにはどうすればよいですか

static constraints = {}

ありがとう

4

1 に答える 1

0
static mapping = {
        title i18nDescription: "text"
    }

これでテキストフィールドが作成されます。4000以上の文字があります。

于 2012-06-15T15:03:09.043 に答える