Open s0thl opened 5 years ago
The dexie-relationships add-on solves this by attaching relation properties as non-enumerable .
Why wont you implement such a base thing into the Dexie core? I'm worried that addon is created by other developer, hence no updates & compatibility with current version of Dexie is guaranteed. 🤔
Side question; is there an advanced project using Dexie I could lookup for a structure and good practices in general? Thanks for your replies. Much appreciated.
I don't want to include too much in Dexie - not to bloat it with code that not everyone use. Dexie relationships is maintained by me and other dev. An integration test is included in dexie's CI that makes sure keeping operability with dexie-relationships.
There are lots of advanced projects using dexie both closed and open source. I'm not keeping track of them but I've tried to list some of them here
Hi,
I'm joining the account comments from the other table like so:
So comments are now attached the
account
instance, that's fine.The problem appears, when that account instance is actually saved into the data store.
Consider following:
As said in the (code) comment, account shouldn't be altered, since nothing was changed (excluding the 'join').
Instead, the joined comments are actually saved along with the account into the
accounts
table!https://i.imgur.com/7QozsfH.png
Why does that happen? I do have some MySQL/SQLite background and to me, it looks weird and wasteful.
What would be a workaround for this?
delete account.comments;
before eachput
call? Make it look unreasonable and it's kinda pointless, speaking ofjoining
principles.