RobinCK / typeorm-fixtures

:pill: Fixtures loader for typeorm 🇺🇦
https://robinck.github.io/typeorm-fixtures/
MIT License
566 stars 45 forks source link

Fix unability to use fixtures resolver with lazy loading entities and typeorm relation promise resolver #159

Closed nmacherey closed 3 years ago

nmacherey commented 3 years ago

This PR updates the schema with the resolvedFields field and add them as Promise.resolve in the builder. These fields are already entities and we do not need to transform them in the plain to class method.

I directly used the value set in the data by the resolver.

It's a proposal, but it is working...

RobinCK commented 3 years ago

@nmacherey thanks, good idea, but for a complete merge, you need to make sure that the tests are fully backward compatible. and no need for resolvedFields: undefined,

You also need to write tests that would check your functionality.

RobinCK commented 3 years ago

thank you temporary merged to develop I need to make sure nothing breaks