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

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

× close