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
All fields on a Dynamoid::Document must be explicitly defined -- if you have fields in the database that are not specified with field, then they will be ignored.
But when I had additional fields in DynamoDB, I got exception:
NoMethodError: undefined method `my_additional_field=' for #<MyTable:0xa6dddc8>
from activemodel-3.2.19/lib/active_model/attribute_methods.rb:407:in `method_missing'
from dynamoid-0.6.1.1/lib/dynamoid/document.rb:123:in `block in load'
from dynamoid-0.6.1.1/lib/dynamoid/document.rb:123:in `each'
from dynamoid-0.6.1.1/lib/dynamoid/document.rb:123:in `load'
from dynamoid-0.6.1.1/lib/dynamoid/document.rb:118:in `block in initialize'
from activesupport-3.2.19/lib/active_support/callbacks.rb:403:in `_run__356022796__initialize__809605463__callbacks'
from activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
from activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_initialize_callbacks'
from activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
from dynamoid-0.6.1.1/lib/dynamoid/document.rb:111:in `initialize'
from dynamoid-0.6.1.1/lib/dynamoid/persistence.rb:61:in `new'
from dynamoid-0.6.1.1/lib/dynamoid/persistence.rb:61:in `from_database'
from dynamoid-0.6.1.1/lib/dynamoid/identity_map.rb:19:in `from_database'
from dynamoid-0.6.1.1/lib/dynamoid/dirty.rb:8:in `from_database'
from dynamoid-0.6.1.1/lib/dynamoid/finders.rb:60:in `find_by_id'
from dynamoid-0.6.1.1/lib/dynamoid/identity_map.rb:35:in `find_by_id'
from dynamoid-0.6.1.1/lib/dynamoid/finders.rb:28:in `find'
from dynamoid-0.6.1.1/lib/dynamoid/document.rb:154:in `reload'
from (irb):5
The text was updated successfully, but these errors were encountered:
This line: https://github.com/Veraticus/Dynamoid/blob/master/lib/dynamoid/fields.rb#L4 says:
All fields on a Dynamoid::Document must be explicitly defined -- if you have fields in the database that are not specified with field, then they will be ignored.
But when I had additional fields in DynamoDB, I got exception:
The text was updated successfully, but these errors were encountered: