简体   繁体   中英

How to create a capped collection in a domain object in Grails using GORM / MongoDB plugin

I wonder if it is possible to link a capped collection to a domain object like for example:

class DomainObject {

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

}

I did not find a way to do it from the domain object.

Regards

I could not get this to work so instead I manually created a capped colletion in mongo and used it in grails. It seems to work great.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM