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

Support for Dexie v3 #49

Open
gund opened this issue Jan 5, 2023 · 9 comments
Open

Support for Dexie v3 #49

gund opened this issue Jan 5, 2023 · 9 comments

Comments

@gund
Copy link

gund commented Jan 5, 2023

Hi, I would like to know what are the plans for support and maintenance of this repo.

I've seen that the last commit here was over 3 years back and latest supported Dexie version is v2 alpha looking at the peer dependencies in package.json, but the current Dexie version is v3 and v4 is already in alpha.

There are also unresolved issues related to old Dexie version such as this one which would be great to get fixed as well.

Could you please let us know if you are still willing to maintain this library and if it's possible to open PRs for this repo?
Or is it better to fork it and take over if you don't have any time for it?

Thanks!

@iberflow
Copy link
Collaborator

Holy crap, sorry for the "delay". I've not used this repo or Dexie for ages so I've no idea what's happening. I'm happy to transfer this repo to anyone willing to maintain it.

@gund @dfahlander

@dfahlander
Copy link
Owner

Hi @ignasbernotas! For my part, I would appreciate having full access to the git repo and the npm package - just so that it is possible to fix issues or accept pull requests. You could either transfer it or given me access

Option 1: Just grant access

npm

npm access grant read-write dfahlander dexie-relationships

https://docs.npmjs.com/cli/v9/commands/npm-access

GitHub

https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository#transferring-a-repository-owned-by-your-personal-account

Option 2: Full transfer

npm

https://docs.npmjs.com/transferring-a-package-from-a-user-account-to-another-user-account

GitHub

https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository


Any of these would do perfectly,
Thanks for your work even if it was some time ago,

/David

@iberflow
Copy link
Collaborator

Let's go with the second option. Though it seems that you might need to delete your fork for this to work.

Screenshot 2023-02-17 at 03 47 13

@dfahlander
Copy link
Owner

Thanks! I just deleted my fork.

@iberflow
Copy link
Collaborator

@dfahlander I've made the transfer request, feel free to confirm.

On a side note, thank you for your contributions and keeping things running, I wish your project and your community the best of luck and easy maintenance 😊✌️

@kheos31
Copy link

kheos31 commented Jun 9, 2023

Hello @dfahlander!
I'm actually get started with Dexie (awesome tool, thanks :p), and I was interested by using this relationships plugin into my project. Unfortunately, none published version seems to be compatible with Dexie 3. Do you have planned to publish a new version soon please? It was very very very useful to me!

Or maybe... Have you any information to make me avoid using of this package? Or any warning?

Thanks in advance!
Regards

@dfahlander
Copy link
Owner

Thanks for a valid question. I won't probably prioritize to update dexie-relationships addon in the near future and I haven't seen so much need of it from the community lately. The reason could be that you can do the same things easily with dexie itself - and also that it doesn't solve the more complex scenarios such as many-to-many relationships etc.

I would recommend you to query related entites with dexie itself only. Add indexing of properties referring to foreign IDs the same way you would do in SQL. Use db.yourTable.where({yourForeignKeyProp: x}).toArray() to query related entities. For many-to-many relations, use a junction table indexed on [firstId+secondId]. Use Table.bulkGet() to resolve objects from IDs.

There are also some samples here: https://dexie.org/docs/API-Reference#joining

That said, dexie is very much backward compatible all the way down to version 2 so dexie-relationships shall work with it. It's actually still continously tested in our CI together with both dexie 3 and dexie 4. It's just the semver that is faulty in it so npm install --legacy-peer-deps would work if you want to give it a try.

@kheos31
Copy link

kheos31 commented Jun 9, 2023

Thanks for your prompt reply! I understand these explained reasons, and indeed, when I test to put this addon on my DB schema, I realize I will have anyway to manage the most complex problems (like fine tree structure :D) manually. I will follow your advices and stay with Dexie alone.

Thanks again and have a nice day!

@ZeeshanAhmadKhalil
Copy link

Hi,

Please if you can mention this in the readme. So people can know from there instead of finding solutions in the issues.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants