Saving debt now saves it's corresponding transaction, and is linked. Note that the best way now to get all the debts in a transaction is to query the debts table for transaction pointer.