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
Merge branch 'feature/Arbitrary-Attribute-Support' into develop
Introduces Programmatic Support for Arbitrary Attributes (#19)
Arbitrary attributes are those added by developers, but which aren't part of the `ContentTypeDescriptor` schema. They may be useful for adding one-off metadata that is useful to add some some topics, but doesn't align well with any individual content type. While rarely used, they're a useful tool for developers—and especially when developing proof-of-concepts (e.g., where the attribute may be formalized later).
Previously, arbitrary attributes could be added to the database. But they couldn't be added, modified, or deleted programmatically using the OnTopic library. In fact, this could be a source of confusion as no error was produced in this scenario; the arbitrary attribute was just ignored entirely. As such, a programmatic modification might appear to work, only to revert when the application restarts.
To mitigate this, while supporting these ad hoc scenarios, we've formalized support for working with arbitrary attributes programmatically, thus providing assurances that they will be properly persisted to the underlying data store. This includes:
- Support for saving arbitrary attributes (c3c01ef)
- Support for deleting arbitrary attributes (2151a08)
- Deleting orphaned indexed attributes (7a61005)
- Excluding empty values from `GetAttributes()` (c035ca0)
- Ignoring phantom attributes on `SetValue()` (a0b659d)
0 commit comments