-
-
Notifications
You must be signed in to change notification settings - Fork 610
Closed
Description
Description
When updating a JSON field using the raw method of a queryBuilder an error is thrown.
Stack trace
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Timeout'
| property '_idlePrev' -> object with constructor 'TimersList'
--- property '_idleNext' closes the circle
at JSON.stringify (<anonymous>)
at JsonType.convertToDatabaseValue (/dir/mikro-orm-issue/node_modules/@mikro-orm/core/types/JsonType.js:11:21)
at /dir/mikro-orm-issue/node_modules/@mikro-orm/knex/query/QueryBuilderHelper.js:62:43
at Array.forEach (<anonymous>)
at QueryBuilderHelper.processData (/dir/mikro-orm-issue/node_modules/@mikro-orm/knex/query/QueryBuilderHelper.js:50:27)
at QueryBuilder.init (/dir/mikro-orm-issue/node_modules/@mikro-orm/knex/query/QueryBuilder.js:411:38)
at QueryBuilder.update (/dir/mikro-orm-issue/node_modules/@mikro-orm/knex/query/QueryBuilder.js:55:21)
at ProjectsController.createProject (/dir/mikro-orm-issue/src/projects/projects.controller.ts:25:8)
at /dir/mikro-orm-issue/node_modules/@nestjs/core/router/router-execution-context.js:38:29
at processTicksAndRejections (internal/process/task_queues.js:97:5)
To Reproduce
Steps to reproduce the behavior:
- git clone git@github.com:RiskChallenger/mikro-orm-issue.git
- cd mikro-orm-issue
- yarn
- yarn test:e2e
Expected behavior
json should be updated using the raw query
Additional context
Versions
| Dependency | Version |
|---|---|
| node | 14 |
| typescript | 3.9.7 |
| mikro-orm | 4.3.1 |
Metadata
Metadata
Assignees
Labels
No labels