从MongoDB迁移到PostgreSQL Groovy应用程序 [英] Migration from MongoDB to PostgreSQL Groovy Application

查看:224
本文介绍了从MongoDB迁移到PostgreSQL Groovy应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将groovy应用程序中的mongoDB迁移到PostgreSQL。我是groovy平台的新手。在其中一个groovy文件中它们是:

静态mapWith =mongo



我完全不清楚这是什么意思。根据 http://grails.github。 io / grails-doc / 3.0.x / ref / Domain%20Classes / mapWith.html


$ b

mapWith


用途



mapWith静态属性增加了控制如果一个域
类被持久化。



示例

  class Airport {
static mapWith =none

}


我也经历了这个问题通过开发模式中的元编程删除simpledb mapWith



我知道在我的grails应用程序中,



静态mapWith =mongo



可能使用mongoDB插件。我不知道我是否正确。那么我需要为这个PostgreSQL迁移行做些什么?

解决方案

通常你必须删除这行,就像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

这篇关于从MongoDB迁移到PostgreSQL Groovy应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆