You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue while trying to update a lazy relation in TypeORM. When attempting to save a new Wallet entity and associate it with an existing User entity using a lazy relation, the wallet_id column in the user table is not being updated correctly.
Faced a similar problem with the ManyToMany relationship. If a new entity is created and a lazy relationship is added immediately, no record is added to the JoinTable. If I save the parent entity and then load it again, then the relationship is created.
I noticed that when a new entity is created, the field is called the same as the field in the entity, but if the entity is loaded from the database, the promice prefix is added to the field.
Issue description
I encountered an issue while trying to update a lazy relation in TypeORM. When attempting to save a new Wallet entity and associate it with an existing User entity using a lazy relation, the wallet_id column in the user table is not being updated correctly.
Expected Behavior
user.wallet_id = wallet.id
Actual Behavior
No change in user data
Steps to reproduce
My Environment
Additional Context
I referenced the steps in the documentation, but it didn't help much
https://typeorm.io/eager-and-lazy-relations#eager-and-lazy-relations
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, but I don't know how to start. I would need guidance.
The text was updated successfully, but these errors were encountered: