【问题标题】:How to create a capped collection in a domain object in Grails using GORM / MongoDB plugin如何使用 GORM / MongoDB 插件在 Grails 中的域对象中创建上限集合
【发布时间】:2012-09-13 19:15:50
【问题描述】:

我想知道是否可以将上限集合链接到域对象,例如:

类域对象{

 static mapping = {
    createdOn capped: true, max: 1, size: 10000

}

我没有从域对象中找到方法。

问候

【问题讨论】:

    标签: mongodb grails grails-orm


    【解决方案1】:

    我无法让它工作,所以我在 mongo 中手动创建了一个有上限的集合并在 grails 中使用它。它似乎工作得很好。

    【讨论】:

      猜你喜欢
      • 2012-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-15
      • 1970-01-01
      • 2015-02-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多