Peck
unread,Sep 11, 2011, 11:12:34 PM9/11/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Mongoid
Having some trouble with my models when upgrading to 2.2.0 (and trying
to fix some of the memory issues with habt relationships).
my User class has this relationship:
belongs_to :parent, :class_name => 'User', :cyclic =>
true, :inverse_of => :children, :autosave => true
has_many :children, :class_name => 'User', :cyclic =>
true, :inverse_of => :parent, :autosave => true
And is now giving the error:
Mongoid::Errors::InvalidOptions: Invalid option :cyclic provided to
relation :parent. Valid options are: autosave, foreign_key, index,
polymorphic, class_name, extend, inverse_class_name, inverse_of, name,
relation, validate.
from /usr/local/lib/ruby/gems/1.9.1/gems/mongoid-2.2.0/lib/mongoid/
relations/options.rb:41:in `block in validate!'
when loading up any instances of the User model.
This had worked previously, and I'm scoured the changelogs and other
issues, but haven't seen anything that seemed related except possibly
some code changes with issue 1151?
Has anyone experienced similar issues when upgrading to 2.2.0?
Thanks