← Back to Stormify Documentation

AutoTable

abstract class AutoTable : StormifyEntity

Base class for entities that support lazy auto-population from the database.

Properties delegated via db will trigger a populate call on first access, loading the entity's data from the database based on its primary key. When multiple AutoTable instances share the same SiblingGroup, they are batch-populated in a single query for efficiency.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Marks this entity as already populated, preventing any future lazy-load.

Link copied to clipboard
fun populate()

Loads this entity's data from the database if it has not been populated yet. Thread-safe.