Skip to content

Dynamic attributes #37

@giallon

Description

@giallon

By default, Couchbase-orm requires all attributes that may be set on a document to be explicitly defined using attribute declarations. Couchbase-orm should also supports creating attributes on the fly from an arbitrary hash or documents stored in the database.

class Person < CouchbaseOrm::Base
 
end

bob = Person.new(name: 'Bob', age: 42)
bob.name
# => "Bob"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions