Describe the bug
After upgrading to 4.3.0, access to the id property of an IdentifiedReference is no longer guaranteed to return the id. The field is potentially undefined.
To Reproduce
const foo: IdentifiedReference<User, "id"> = Reference.create<User, "id">(user);
const bar:string = foo.id;
Expected behavior
The above code compiles.
Additional context
This doesn't happen in 4.2.0.
Versions
| Dependency |
Version |
| node |
14 |
| typescript |
4.03 |
| mikro-orm |
4.3.0 |
| your-driver |
? |