Skip to content

Commit

Permalink
Merge pull request #770 from hoavo1490/fix/mariadb-alias
Browse files Browse the repository at this point in the history
fix(crud-typeorm): add MariaDB to getFieldWithAlias
  • Loading branch information
michaelyali committed Nov 29, 2022
2 parents 5fed4d0 + f0b8785 commit 5e4e363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/crud-typeorm/src/typeorm-crud.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ export class TypeOrmCrudService<T> extends CrudService<T> {

protected getFieldWithAlias(field: string, sort = false) {
/* istanbul ignore next */
const i = this.dbName === 'mysql' ? '`' : '"';
const i = ['mysql','mariadb'].includes(this.dbName) ? '`' : '"';
const cols = field.split('.');

switch (cols.length) {
Expand Down

0 comments on commit 5e4e363

Please sign in to comment.