I've created a fork to work on the ability to resolve promises for lazy loaded relations in typeorm. The idea is to have the same principle as resolving references but adding a promise.resolve once it has been resolved.
I am facing issues in the Builder expecially regarding the usage of the class-transformer package. The current code is the following:
plainToClassFromExist(entity, data, { ignoreDecorators: true }) -> decorator are ignored and the class-transformer produces the following plaintToClass transformation:
I fully understand why the option is there, but I cannot find any solution to get rid of this and get the resolved promise in the transformation output.
If you have any idea on how we can easilly solve this step and get the proper property names in the output it would be great !
Thanks
Hi,
I've created a fork to work on the ability to resolve promises for lazy loaded relations in typeorm. The idea is to have the same principle as resolving references but adding a promise.resolve once it has been resolved.
https://github.com/getbigger-io/typeorm-fixtures/blob/master/src/parsers/PromiseReferenceParser.ts
I am facing issues in the Builder expecially regarding the usage of the
class-transformer
package. The current code is the following:plainToClassFromExist(entity, data, { ignoreDecorators: true }) -> decorator are ignored and the class-transformer produces the following plaintToClass transformation:
I fully understand why the option is there, but I cannot find any solution to get rid of this and get the resolved promise in the transformation output.
If you have any idea on how we can easilly solve this step and get the proper property names in the output it would be great ! Thanks