Nested type registries
The goal of this PR is to add nested registries to hive in order to increase typeId limit for the models.
The original implementation has been written by @xal with https://github.com/hivedb/hive/pull/804.
The final design adds the following api to the hive TypeRegistry interface (which is accessible through Hive singleton value).
Hive.registerNestedAdapters((registry) {
registry.registerAdapter<User>(UserAdapter());
}, parentTypeId: 3);
Basically put the registerNestedAdapters method lets users to allocate a single typeId and use it for a nested type registry which can be used for registering multiple types with a single id. The nested type registry has similar characteristics as the global type registry like 256 typeId space for each nested registry, typeIds should be unique and should not be changed after being written to the disk.
Please make this possible, we are struggling!
The feature is ready, but there's some issues with web builds needs to be fixed. I will take a look when I have some free time, but can't promise any ETA.
The feature is ready, but there's some issues with web builds needs to be fixed. I will take a look when I have some free time, but can't promise any ETA.
I will wait for it! In our case, it takes so much effort to convert our super (multimodule) app to any other db option. We are dependent on Hive. All we can do is increase the typeId limit. I tried to get multiple instances from hive using HiveImpl() low-level API but it doesn't work. (says "Did you forget to use openBox)