Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/typeorm/src/index.ts>Repository#findOneOrFail

Forked from https://github.com/typeorm/typeorm
Latest
method Repository.prototype.findOneOrFail
Re-export
import { Repository } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Finds first entity that matches given options.

Parameters

optional
id:
| string
| number
| Date
| ObjectID
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity>

Finds first entity that matches given options.

Parameters

optional
options: FindOneOptions<Entity>

Returns

Promise<Entity>

Finds first entity that matches given conditions.

Parameters

optional
conditions: FindConditions<Entity>
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity>