workflo.macros.entity.refs

+refmap+

entity-backrefs

(entity-backrefs entity-name)

Returns all references to an entity from other entities. The result is a map that maps attribute names (e.g. :post/author) to reference infos (e.g. {:entity 'post :many? true}.

entity-refs

(entity-refs entity-name)

Returns all references from an entity to other entities. The result is a map that maps attribute names (e.g. :user/friends) to reference infos (e.g. {:entity 'user :many? true}.

register-entity-refs!

(register-entity-refs! entity-name entity-def)

Adds all refs defined by an entity to the intetnal refmap. This includes adding backrefs in the reverse direction.

remove-backrefs-to

(remove-backrefs-to entity-name backrefs)

unregister-entity-refs!

(unregister-entity-refs! entity-name)

Removes all refs defined by an entity from the internal refmap. This includes backrefs created for the refs of the entity.