I felt ambiguous with the explanation provided on the docs, should the typeId of @HiveType be unique per model? Or I could do it like this, for instance:
@HiveType(typeId: 0)
class ClassA extends HiveObject {}
@HiveType(typeId: 0)
class ClassB extends HiveObject {}
@HiveType(typeId: 0)
class ClassC extends HiveObject {}
Or it should be like this?
@HiveType(typeId: 0)
class ClassA extends HiveObject {}
@HiveType(typeId: 1)
class ClassB extends HiveObject {}
@HiveType(typeId: 2)
class ClassC extends HiveObject {}
Version
It must be unique! ๐
Hi @mbaumgartenbr ! Thanks for answering, so the properway is like the 2nd snippet I defined above?
Yep ๐
I see.. Thanks for fast response, have a nice day! I'm closing it. ๐ฑโ๐
Link -> https://docs.hivedb.dev/#/custom-objects/type_adapters?id=register-adapter
"Every type has a unique typeId which is used to find the correct adapter when a value is brought back from disk. All typeIds between 0 and 223 are allowed."