Skip to content

feat: Add SelectQueryBuilder.getOneOrFail()#6885

Merged
imnotjames merged 1 commit intotypeorm:masterfrom
imnotjames:feat/qb-getOneOrFail
Oct 16, 2020
Merged

feat: Add SelectQueryBuilder.getOneOrFail()#6885
imnotjames merged 1 commit intotypeorm:masterfrom
imnotjames:feat/qb-getOneOrFail

Conversation

@imnotjames
Copy link
Contributor

This adds a getOneOrFail which which is to getOne as
findOneOrFail is to findOne - it never returns undefined,
it will instead throw an EntityNotFoundError

closes #6246

@imnotjames imnotjames force-pushed the feat/qb-getOneOrFail branch 2 times, most recently from 31f1a8f to 150b773 Compare October 11, 2020 00:16
This adds a `getOneOrFail` which which is to `getOne` as
`findOneOrFail` is to `findOne` - it never returns `undefined`,
it will instead throw an `EntityNotFoundError`

closes typeorm#6246
@imnotjames imnotjames force-pushed the feat/qb-getOneOrFail branch from 150b773 to 5fdafc1 Compare October 11, 2020 01:06
@imnotjames imnotjames merged commit 920e781 into typeorm:master Oct 16, 2020
@imnotjames imnotjames deleted the feat/qb-getOneOrFail branch October 16, 2020 02:55
@imnotjames imnotjames added the hacktoberfest-accepted label hacktoberfest label Oct 16, 2020
zaro pushed a commit to zaro/typeorm that referenced this pull request Jan 12, 2021
This adds a `getOneOrFail` which which is to `getOne` as
`findOneOrFail` is to `findOne` - it never returns `undefined`,
it will instead throw an `EntityNotFoundError`

closes typeorm#6246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted label hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

queryBuilder.getOneOrFail

1 participant