Skip to main content
Module

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

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

Finds first entity that matches given find options or rejects the returned promise on error.

Parameters

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

Returns

Promise<Entity>

Finds first entity that matches given find options or rejects the returned promise on error.

Parameters

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

Returns

Promise<Entity>

Finds first entity that matches given find options or rejects the returned promise on error.

Parameters

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

Returns

Promise<Entity>

Finds first entity that matches given find options or rejects the returned promise on error.

Parameters

entityClass: ObjectType<Entity>
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity>

Finds first entity that matches given find options or rejects the returned promise on error.

Parameters

entityClass: EntitySchema<Entity>
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity>

Finds first entity that matches given find options or rejects the returned promise on error.

Parameters

entityClass: string
optional
options: FindOneOptions<Entity>

Returns

Promise<Entity>

Finds first entity that matches given conditions or rejects the returned promise on error.

Parameters

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

Returns

Promise<Entity>

Finds first entity that matches given conditions or rejects the returned promise on error.

Parameters

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

Returns

Promise<Entity>

Finds first entity that matches given conditions or rejects the returned promise on error.

Parameters

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

Returns

Promise<Entity>