-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(query builder): Throw error on missing or unknown properties #3324
Conversation
vlapo
commented
Dec 25, 2018
- handle emptiness and wrong properties in update query builder
- fix Query builder update generates broken SQL #2849
constructor() { | ||
super(); | ||
Object.setPrototypeOf(this, UpdateValuesMissingError.prototype); | ||
this.message = `Cannot perform update query because update values are not defined. Call "qb.set(...)" method to specify inserted values.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"updated values"
src/error/ColumnMetadataNotFound.ts
Outdated
constructor(propertyPath: string) { | ||
super(); | ||
Object.setPrototypeOf(this, ColumnMetadataNotFoundError.prototype); | ||
this.message = `No column metadata for property "${propertyPath}" was found.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably we need to give more user-friendly error. Users don't know what "metadata" means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. We need more user friendly errors. What do you suggest?
EntityColumnNotFound -> No entity column "${propertyPath}" was found.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it can be it
Totally forgot. Updated by comments. |
Thank you. This is important to mention in changelog. In can break some exist code in a way. |