Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tapdb/universe: fix universe event logging for grouped assets
In this commit, we fix the universe event logging for grouped assets. As is, when we go to insert assets with a group, then the "first" inserted asset is what's known as the `asset_id` in the `universe_roots` table. When we go to log a proof insert/sync event, and the even only has an asset ID, we may end up with a failed query, as only the "first" asset ID would return the row we want. In order to fix this, rather than trying to match the asset ID with a root, we instead find the _leaf_ for that asset ID, then use that to get the primary key of the universe root via it's foreign key ref.
- Loading branch information