Skip to content

[BUG] .ignored_properties breaks #reload when there is legacy data #71

@pimpin

Description

@pimpin
class User < CouchbaseOrm::Base
  self.ignored_properties = [:some_property_that_were_before_declared_as_attribute]
  attribute :name, :string
end

user = User.create(name: 'John')
::CouchbaseOrm::Base.cluster.query(
          "UPDATE `your_bucket_name` USE KEYS '#{user.id}' SET some_property_that_were_before_declared_as_attribute='test' RETURNING *",
        )
user.reload # => raise an ActiveModel::UnknownAttributeError, unknown attribute 'some_property_that_were_before_declared_as_attribute' for User.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions