dexie-relationships icon indicating copy to clipboard operation
dexie-relationships copied to clipboard

Support for Dexie v3

Open gund opened this issue 2 years ago • 9 comments

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!

gund avatar Jan 05 '23 20:01 gund

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

iberflow avatar Feb 15 '23 20:02 iberflow

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

dfahlander avatar Feb 15 '23 21:02 dfahlander

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

iberflow avatar Feb 17 '23 01:02 iberflow

Thanks! I just deleted my fork.

dfahlander avatar Feb 17 '23 02:02 dfahlander

@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 😊✌️

iberflow avatar Feb 26 '23 19:02 iberflow

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

kheos31 avatar Jun 09 '23 08:06 kheos31

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.

dfahlander avatar Jun 09 '23 09:06 dfahlander

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!

kheos31 avatar Jun 09 '23 10:06 kheos31

Hi,

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

Thanks.

ZeeshanAhmadKhalil avatar May 16 '24 06:05 ZeeshanAhmadKhalil