-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Attributes, Dev Exp
-
Labels:None
Call stack:
2020-06-11 19:10:10 - Mongoid::Errors::InvalidValue -
message:
Value of type Array cannot be written to a field of type Hash
summary:
Tried to set a value of type Array to a field of type Hash
resolution:
Verify if the value to be set correspond to field definition:
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes.rb:362:in `validate_attribute_value'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes.rb:165:in `block in write_attribute'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/threaded/lifecycle.rb:33:in `_assigning'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes.rb:164:in `write_attribute'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/fields.rb:464:in `block (2 levels) in create_field_setter'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes/dynamic.rb:106:in `process_attribute'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes/processing.rb:27:in `block in process_attributes'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes/processing.rb:25:in `each_pair'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes/processing.rb:25:in `process_attributes'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes.rb:200:in `block in assign_attributes'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/threaded/lifecycle.rb:33:in `_assigning'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes.rb:199:in `assign_attributes'
/home/me/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mongoid-7.1.2/lib/mongoid/attributes.rb:218:in `write_attributes'