You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Translate UniqueKey to TopicID in attributes on Import()
Some types of attributes—such as `TokenizedTopicList`, `TopicList`, and `TopicReference`—create pointers to other topics. These can be stored in a variety of formats, including topic key, unique key, or topic ID. If the latter, that can introduce problems when exporting the data, as those IDs won't be maintained when importing them into a new database.
To mitigate this, these are translated from `TopicID` to `UniqueKey` on `Export()` (0993ea3). To complement this, I've introduced a new `GetTopicID()` helper function and corresponding `getAttributeValue()` local function into the `Import()` extension method. If an attribute ends with `ID`, begins with `Root`, and maps to a topic with the same `UniqueKey` in the topic graph, then the value is replaced with the topic's `Id` on import.
There's a _very_ minor risk of false positives during this process, and we'd need to come up with pretty contrived scenarios where that would occur (e.g., an attribute with the key `Kid` and value `Root` would have the value replaced with the `TopicID` of the root topic). The far greater risk remains in the `Export()` scenario (as discussed in 0993ea3).
0 commit comments