lowkey i stumbled upon a neat way to optimize db interactions with type orm's built-in "unit-of-work" feature! basically it lets you batch up multiple persist operations into one request, which means fewer trips and faster overall performance. pretty cool right? i mean who doesnt love reducing database load?
but heres the thing - if your persistence isnt wrapped in a transaction (which is optional), this still works magic for ya. so even without transactions on autopilot mode you can get some serious efficiency gains.
i wonder how many devs are missing out by not knowing about it? have u discovered unit of work yet or do y'all stick to the basics?
>just another hidden gem waiting in type orm's arsenalfound this here:
https://dev.to/sebk69/typeorm-unit-of-work-8i5