mongodb - 从 MongoDB 迁移到 PostgreSQL Groovy 应用程序

标签 mongodb postgresql grails

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

static mapWith = "mongo"

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

ma​​pWith

Purpose

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

Examples

class Airport {
  static mapWith = "none"

}

我也经历过这个问题Remove simpledb mapWith by meta programming in dev mode

我在我的 grails 应用程序中得到一个想法,

static mapWith = "mongo"

可能正在使用 mongoDB 插件。我不知道我是否正确。那么对于 PostgreSQL 迁移,我需要用这一行做什么?

最佳答案

通常你必须删除该行,因为对于基于 SQL 的 GORM-ing,默认值就可以了

关于mongodb - 从 MongoDB 迁移到 PostgreSQL Groovy 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34743034/

相关文章:

MongoDB 关系 : embed or reference?

postgresql - 如何在 Amazon ec2 上升级 psql?

grails 将 gorm 子查询动态添加到现有查询中

hibernate - 如何在条件中使用 'in' 来查询子对象?

mongodb - mongoose - 按数组长度排序

java - 使用java仅检索MongoDB中对象数组中的查询元素

linux - 在linux上安装多个版本的MongoDB

sql - 生成 SQL 以更新主键

sql - 根据聚合数据对行进行排序

web-applications - 没有Apache的JVM上的mod-pagespeed?