Liking cljdoc? Tell your friends :D

fabrikk.entity.core

Entities represent the domain entities being created during factory execution.

They provide a concept of identity that links pending and persisted versions of an entity. To motivate this imagine a post that refers to a user by id: post->user.

When we build this post, we're aiming to create consistent production-like data; the post should refer to the user by its' id. When we persist these entities, the persistence layer will likely change the id of the user, so we'd like to be able to propagate this change to the post before persisting it in turn.

The same applies to other attributes on the user that may change during persistence, since these may also be referenced in the post.

Entities provide an identity separate from the identity of the domain enitity they represent. So that references between them are 'static'. They provide conflict and combine semantics to capture the following fact: from the perspective of the executor of build/create the value of an entity should change only when the entity is persisted.

Entities represent the domain entities being created during factory execution.

They provide a concept of identity that links pending and persisted versions
of an entity. To motivate this imagine a post that refers to a user by id: 
`post->user`.

When we `build` this post, we're aiming to create consistent production-like 
data; the post should refer to the user by its' id. When we persist these
entities, the persistence layer will likely change the id of the user, so we'd
like to be able to propagate this change to the post before persisting it in 
turn. 

The same applies to other attributes on the user that may change during 
persistence, since these may also be referenced in the post.

Entities provide an identity separate from the identity of the domain enitity
they represent. So that references between them are 'static'. They provide 
conflict and combine semantics to capture the following fact: from the perspective
of the executor of build/create the value of an entity should change only when the
entity is persisted.
raw docstring

assert-no-conflictclj/s

(assert-no-conflict entity other-entity)

associate-asclj/s

(associate-as entity)

combineclj/s

(combine entity other-entity)

combine-no-conflictclj/s

(combine-no-conflict entity other-entity)

conflict?clj/s

(conflict? entity other-entity)

create!clj/s

(create! factory build-opts)

create-list!clj/s

(create-list! value)

factoryclj/s


factory-idclj/s

(factory-id entity)

identity-association?clj/s


list-item-kwclj/s


needs-persist?clj/s

(needs-persist? entity)

no-conflict?clj/s


override-associationclj/s

(override-association entity associate-as)

pending?clj/s


persist-withclj/s

(persist-with entity)

persistable?clj/s

(persistable? entity)

persisted-match?clj/s

(persisted-match? entity other-entity)

persisted-mismatch?clj/s


persisted?clj/s


pick-persistedclj/s

(pick-persisted entity other-entity)

Assumes only one is persisted

Assumes only one is persisted
raw docstring

refresh-uuidclj/s

(refresh-uuid entity)

set-persisted-valueclj/s

(set-persisted-value entity value)

suppress-list-associationclj/s

(suppress-list-association entity)

update-valueclj/s

(update-value entity f args)

uuid-match?clj/s

(uuid-match? entity other-entity)

uuid-mismatch?clj/s


valueclj/s


value-match?clj/s

(value-match? entity other-entity)

value-mismatch?clj/s


value-to-assocclj/s

(value-to-assoc {:keys [value] :as entity} associate-as)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close