RelationProxy.first

Fetches the first record matching the filters.

Will return a Nullable null value if no matches.

If data is already cached and not marked stale/unfresh, it will reuse it, meaning that calling this after calling all will not generate an additional query, even if called multiple times. Will not cache its own result, only reuse existing data.

struct RelationProxy(T)
@property
Nullable!T
first
(
)

Examples

auto p = RelationProxy!User();
auto user = p.where(["something": 123]).first;

Meta