且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从MongoDB迁移到PostgreSQL Groovy应用程序

更新时间:2022-10-14 23:17:19

通常你必须删除这行,就像SQL基于GORM的默认值是好的


I am working on migration of mongoDB to PostgreSQL on groovy application. I am new to groovy platform. In one of the groovy file their is :

static mapWith = "mongo"

I am exactly not clear what does it means. According to http://grails.github.io/grails-doc/3.0.x/ref/Domain%20Classes/mapWith.html

mapWith

Purpose

The mapWith static property adds the ability to control if a domain class is being persisted.

Examples

class Airport {
  static mapWith = "none"

}

I also went through this question Remove simpledb mapWith by meta programming in dev mode

and I got an idea that in my grails application,

static mapWith = "mongo"

might be using mongoDB plugin. I don't know I am correct or not. So what does I need to do with this line for PostgreSQL migration?

Usually you have to remove the line, as for SQL-based GORM-ing the defaults are fine