Skip to content

struct Athena::ORM::UnitOfWork::Change
inherits Struct #

A field's change within a change set, as returned by UnitOfWork#entity_changeset.

#old is the value the field had when the entity was loaded or last flushed, and is nil for entities being inserted. #new is the value that is being written. Read the underlying values with #value; enum fields hold the integer they're stored as.

Constructors#

.new(old : AORM::Mapping::Value | Nil, new : AORM::Mapping::Value)#

View source

Methods#

#clone#

View source

#copy_with(old _old = @old, new _new = @new)#

View source

#new : AORM::Mapping::Value#

#old : AORM::Mapping::Value | ::Nil#