Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about Type ID #525

Closed
Minsamin opened this issue Dec 24, 2020 · 8 comments · Fixed by #804
Closed

Questions about Type ID #525

Minsamin opened this issue Dec 24, 2020 · 8 comments · Fixed by #804
Labels
needs-author-feedback Needs feedback from author

Comments

@Minsamin
Copy link

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."

  1. This means I can have a maximum of 223 dart model classes ?
  2. I have to remember what's the last Type ID I used in my app, and increment accordingly ?
  3. If my app need more than 223 Model Classes then what should I do ?

Originally posted by @Minsamin in #518 (comment)

@themisir
Copy link
Contributor

Sorry for the late response.

This means I can have a maximum of 223 dart model classes ?

Yes.

I have to remember what's the last Type ID I used in my app, and increment accordingly ?

Yes.

If my app need more than 223 Model Classes then what should I do ?

The type id coult limitation was a design decision and can not be changed otherwise it will invalidate exists databases. But I think you can use same typeId for multiple models by writing custom adapters, a bit hacky but might work.

@themisir themisir added the needs-author-feedback Needs feedback from author label Jan 30, 2021
@ariefwijaya
Copy link

Sorry for the late response.

This means I can have a maximum of 223 dart model classes ?

Yes.

I have to remember what's the last Type ID I used in my app, and increment accordingly ?

Yes.

If my app need more than 223 Model Classes then what should I do ?

The type id coult limitation was a design decision and can not be changed otherwise it will invalidate exists databases. But I think you can use same typeId for multiple models by writing custom adapters, a bit hacky but might work.

Can you give us the example about this part?

But I think you can use same typeId for multiple models by writing custom adapters, a bit hacky but might work.

@qbait
Copy link

qbait commented Nov 15, 2021

Same problem here, we have pretty big app, and that limit is getting problematic.

@cbalmeida

This comment has been minimized.

@baumths
Copy link

baumths commented Jan 3, 2022

Isar is stable now:

#246 (comment)

@BenjiFarquhar
Copy link

@mbaumgartenbr, I guess I will migrate to Isar; I wish I noticed this sooner :)

Do you know if Isar has the number of types limit issue in this question?

@baumths
Copy link

baumths commented Jan 3, 2022

Hi @BenjaminFarquhar!

I haven't tried it out yet but I assume it doesn't because this was one of the many reasons the author started working on Isar in the first place.

@themisir themisir closed this as completed Jan 4, 2022
@ArslanAsghar123
Copy link

since I have implement different typeid's but same hiveobjects like in every model from 0 to 10 or required but sometimes it worked but sometimes data stuck and can not view it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-author-feedback Needs feedback from author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants