Hi everyone!
When I credit holdings using Holding.Account.Credit I create new Holding in the Account. Alongside with the others that I created before. What is the best way to automatically merge them?
I consider few things:
- I want to avoid race conditions. When some process use holding that I’m trying to merge
- In the UI I don’t what to show the user the list of similar holdings. So maybe I can merge it on the client side? And that’s it.
- Sometimes I have to merge, when I need to transfer the amount that is bigger then each particular holding I have.
What can you suggest here? I’m thinking now about avoiding merging as much as possible. So even if I need to transfer big amount I can make it in several transfers. And split at the end.
Thanks!