You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gives me this error when trying to create the fixtures (let me know if you want a full trace):
Mongo::Error::OperationFailure: An empty update path is not valid. (56)
...mongoid stack...
/bundler/gems/mongoid-fixture_set-7b7d767542f9/lib/mongoid/fixture_set.rb:109:in `update_document'
However, if I remove the inverse_of: nil from items and uncomment the has_and_belongs_to_many relation in other_items, the fixtures work as expected.
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks for the note Geoffroy. Sorry I'm not motivated enough or feel like I
have enough background to own this gem. I have been using it in an
experimental project (and I'm just learning MongoDB) and it's been working
just fine other than the issue mentioned above - but maybe I'll switch over
to factory girl or something similar if you think this gem is too unstable
/ out of date.
I have two models like this:
class Item
include Mongoid::Document
field :name, type: String
has_and_belongs_to_many :other_items, inverse_of: nil
end
class OtherItem
include Mongoid::Document
field :name, type: String
has_and_belongs_to_many :items
end
Then I try to create fixtures like this:
items.yml:
item1:
name: item1
other_items:
-other_item1
other_items.yml:
other_item1:
name: other_item1
This gives me this error when trying to create the fixtures (let me know if you want a full trace):
Mongo::Error::OperationFailure: An empty update path is not valid. (56)
...mongoid stack...
/bundler/gems/mongoid-fixture_set-7b7d767542f9/lib/mongoid/fixture_set.rb:109:in `update_document'
However, if I remove the inverse_of: nil from items and uncomment the has_and_belongs_to_many relation in other_items, the fixtures work as expected.
Thanks!
The text was updated successfully, but these errors were encountered: