View Source Pointers.Pointer (bonfire_umbrella v0.9.6-classic-beta.12)
A Pointer is any object that can be referenced by its id.
Pointer is a simple table consisting of three fields:
- id - the database-unique id for this pointer in ULID format.
- table_id - a type tag, references
- deleted_at - timestamp of when the object was deleted, null by default.
any object, simply reference
alias Pointers.Pointer belongs_to :object, Pointer
To define a new object type there are two options, you should choose one:
Virtual- an object type with a view over
Pointerlimited by type.
Pointable- an object type with a table which is kept synchronised with
For most purposes, you should use a
Virtual. Pointable exists mostly to support existing code.
The major difference in practice is that you cannot add new fields to a virtual. Most of the time
you will want to store such extra fields in one or more mixins anyway so they may be reused.
Mixin for more information about mixins.