Do you know if there is a way to create a Lock that is related to an existing transaction, in the sense that if transaction is finished (commit or rollback) Lock is removed. I ask this because in the following example Lock is there until process is killed.
I know, that, Caché itself is locking internally a table register when doing an OpenId with exclusive flag during the transaction life. For example :
Do ##class(MyTable).%OpenId(<TableID>, 4) (This internally is creating a Lock +^User.MyTable(<TableID>)
TROLLBACK (This action removes the previous lock)
I want to do the same without locking an existing table register.