Optional_MongoDB ObjectId (undefined until saved).
Author player reference — the durable id link (playerId for an Avatar; empty for anonymous guests). The display name is resolved FROM this id at read time (live avatar → durable Avatar template), never frozen here, so a rename reflects and the byline can be made viewer-aware later.
The _id of the owning Board.
Body, stored as MML (Mml.markdownToMml on the way in).
Created timestamp (set on construction).
Denormalized downvote count (Wave 2).
Last-edit timestamp, or null.
Parent entry _id, or null for a root Thread.
Edge kind, organizer-scoped: 'reply' on a popularity board; one of
'supports' / 'objects-to' / 'responds-to' on an argument board.
Meaningless on a root Entry (parent === null).
'active' or 'locked' (no further replies).
Promoted thread's thread-subject _id, or null.
Thread title (root entries); empty for posts.
Denormalized upvote count (Wave 2).
Last updated timestamp (set on every save).
StaticcollectionCollection name (must be overridden in subclass).
StaticpersistentDelete this object from MongoDB.
Unlike the former Persistable.delete, there is no
StuffApi.destruct cascade — a Document is not registered, so there
is no runtime instance to unregister.
ProtectedfromLoad data from a MongoDB document into this object.
Symmetric to toDocument: marshallers transform their assigned
fields' raw values via fromStored before bracket-assign hits the
runtime setter.
ProtectedgetGet all persistent fields for this class (mixin + own declarations).
ProtectedgetLast-edit timestamp, or null if never edited.
The typed edge to this entry's parent (organizer-scoped).
Net popularity score (up − down).
True for a root Thread (no parent).
ProtectedpreloadPre-warm the marshaller cache for this instance's class via the async
resolver. Static counterpart Document.preloadFieldMarshallersFor is used
by the findById / find paths.
Save this object to MongoDB. Updates updatedAt automatically.
Pre-resolves any registered field marshallers via the async resolver
before the sync toDocument walk; the sync resolver lookup inside
toDocument then always hits a populated cache.
ProtectedtoConvert this object to a plain document for MongoDB.
Marshallers (declared via static fieldMarshallers on a mixin or
class) intercept their assigned fields: the runtime value-object
value is passed through marshaller.toStored before being written
into the doc. Fields without a marshaller pass through bracket-read
unchanged.
StaticfindFind documents matching a query. Same construction story as findById.
StaticfindFind a document by MongoDB _id. Returns null if not found.
Construction is a plain new this() — the returned instance is NOT
registered with StuffApi and is NOT proxy-wrapped. Two calls for the
same id return two distinct instances (value semantics).
StaticpreloadStatic-context preload helper. Used by findById / find where
there's no instance to call preloadFieldMarshallers on yet, and
by Template._materialize for the same reason. Symmetric with the
protected instance method.
StaticsetWire the marshaller-resolution seam once at boot (and in tests).
Keeps Document free of a StuffApi import while still reaching
the Idea-rooted marshaller instances. sync mirrors
StuffApi.findByTemplatePath (returns the registered instance or
undefined); async mirrors StuffApi.singleton (resolves /
lazy-clones the instance, warming the cache sync then hits).
Base for MongoDB-backed records. NOT in the Stuff hierarchy.