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
This doesn't work right now. It's a pain to copy all the object properties if an object is already passed as an argument, and it has already been validated, sanitized, I should be able to directly pass in the object when creating a new instance.
Reacted by Tolga-FNT, Hannes Rüger, Abbas Monfared, Roy, Jefferson Carvalho, Alejandro Peinó, Alessandro, MG, Andrey Sakharov, dan-klasson and 2 more
TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).
As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.
🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.
Activity
imomin commentedon Jul 30, 2019
This is how I do it,
this.attributeRepository.create(attributeObj).save();optionally, you can create your own constructor, in your entity class.
mak1986 commentedon Dec 29, 2020
This is how I do it with lodash.
nebkat commentedon Dec 29, 2020
Useful solution for this pattern:
mishabruml commentedon Jun 16, 2022
Lovely, thank you! Your first snippet is missing a Type parameter
<T>:dlahaye commentedon Apr 24, 2024
Because
BaseEntityowns a static methodcreate, maybe this pattern could help too :)What do you think about?
github-actions commentedon Sep 18, 2025
TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).
As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.
🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.