Skip to content

Commit d66c171

Browse files
committed
docs(mikroorm): add a caveat about serialization
1 parent 7954b80 commit d66c171

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content/recipes/mikroorm.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ object.
182182
> still need CLI config with the full list of entities. On the other hand, we can
183183
> use globs there, as the CLI won't go thru webpack.
184184
185+
186+
#### Serialization
187+
188+
> warning **Note** MikroORM wraps every single entity relation in a `Reference<T>` or a `Collection<T>` object, in order to provide better type-safety. This doesn't play well with class-transformer and the [serialization technique described in the NestJS docs](/techniques/serialization).
189+
190+
In order to achieve serialization with MikroORM, the recommended way is to use the [built-in serialization API](https://mikro-orm.io/docs/serializing).
191+
185192
#### Request scoped handlers in queues
186193

187194
> info **info** `@UseRequestContext()` decorator was added in v4.1.0

0 commit comments

Comments
 (0)