-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FindCriteriaNotFoundError must extend EntityColumnNotFound
- Loading branch information
1 parent
51da0ab
commit 0128a9e
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import {EntityMetadata} from ".."; | ||
import {EntityColumnNotFound} from "./EntityColumnNotFound"; | ||
|
||
/** | ||
* Thrown when specified entity property in the find options were not found. | ||
*/ | ||
export class FindCriteriaNotFoundError extends Error { | ||
export class FindCriteriaNotFoundError extends EntityColumnNotFound { | ||
|
||
constructor(propertyPath: string, metadata: EntityMetadata) { | ||
super(); | ||
super(propertyPath); | ||
Object.setPrototypeOf(this, FindCriteriaNotFoundError.prototype); | ||
this.message = `Property "${propertyPath}" was not found in ${metadata.targetName}. Make sure your query is correct.`; | ||
} | ||
|
||
} | ||
} |