Skip to content

Commit

Permalink
- Fixes unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennenoel committed Sep 8, 2024
1 parent a4eec79 commit 5fd87e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/mysql/src/clients/mysql.client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ describe('MySQL Client', () => {
expect(uniqueIdColumnMetadata.name).toBeUndefined()
expect(uniqueIdColumnMetadata.isPrimaryKey).toBeTruthy()

expect(mysqlClient.getColumnMetadata(User, "firstName")).toStrictEqual({"isSearchable": true, "isJsonBlob": true});
expect(mysqlClient.getColumnMetadata(User, "lastName")).toStrictEqual({"isSearchable": true, "isJsonBlob": true});
expect(mysqlClient.getColumnMetadata(User, "firstName")).toStrictEqual({"isSearchable": true, "isJsonBlob": false});
expect(mysqlClient.getColumnMetadata(User, "lastName")).toStrictEqual({"isSearchable": true, "isJsonBlob": false});
})

it("should retrieve the primary key column name", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mysql/src/clients/mysql.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export class MysqlClient implements MysqlClientInterface {
const propertyNames = Object.keys(columns).filter(column => column !== primaryKeyPropertyName);

const columnNames = propertyNames.map(column => this.getColumnName(element.constructor as { new(): T; }, column));
const columnValues = Object.keys(columns).map(column => {
const columnValues = propertyNames.map(column => {
const columnMetadata = this.getColumnMetadata(element.constructor as { new(): T; }, column);

const columnValue = element[column];
Expand Down

0 comments on commit 5fd87e5

Please sign in to comment.