mongoid 3.0.0.rc下报mongoid index语法错误 #9

Closed
jeffma opened this Issue Jul 2, 2012 · 1 comment

Projects

None yet

2 participants

@jeffma
jeffma commented Jul 2, 2012

我的环境:
mongoid: 3.0.0.rc
报错如下:
Problem:
Invalid index specification on Homeland::Topic: replied_at, {}
Summary:
Indexes in Mongoid are defined as a hash of field name and direction/2d pairs, with a hash for any additional options.
Resolution:
Ensure that the index conforms to the correct syntax and has the correct options.

Valid options are:
background: true|false
drop_dups: true|false
name: 'index_name'
sparse: true|false
unique: true|false

Valid types are: 1, -1, '2d'

Example:
class Band
include Mongoid::Document
index({ name: 1, label: -1 }, { sparse: true })
index({ location: '2d' }, { background: true })
end
看样子应该是topic的index格式不对

@huacnlee huacnlee added a commit that referenced this issue Jul 2, 2012
@huacnlee huacnlee Fix models to support Mongoid 3.0.0.rc #9;
Fix font size for Topic body;
Update readme to add test guides;
Version to 0.0.8;
3609e23
@huacnlee
Member
huacnlee commented Jul 2, 2012

好了,现在尝试 0.0.8 版本就可以了。

@huacnlee huacnlee closed this Jul 2, 2012
@huacnlee huacnlee added a commit that referenced this issue Mar 22, 2016
@huacnlee huacnlee Fix models to support Mongoid 3.0.0.rc #9;
Fix font size for Topic body;
Update readme to add test guides;
Version to 0.0.8;
9058b49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment