We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure if this'd be solved in adapter-space, or if I've configured something wrong. But I have the following models:
Identity
export default class Identity extends Model implements Partial<PublicKey> { // ... }
User
export default class User extends Identity implements Partial<KeyPair> { @attr() privateKey!: Uint8Array; }
Contact
export default class Contact extends Identity { @attr() onlineStatus?: STATUS; }
Message
export default class Message extends Model { @belongsTo('identity', { async: false, polymorphic: true }) sender?: Identity; }
My Adapter and Serializer config:
import LFAdapter from 'ember-localforage-adapter/adapters/localforage'; export default LFAdapter.extend({ caching: 'none', shouldBackgroundReloadRecord() { return true; }, shouldBackgroundReloadAll() { return true; }, }); import LFSerializer from 'ember-localforage-adapter/serializers/localforage'; export default LFSerializer;
The problem I'm having is that I have a Message with sender id of a contact.
Here is the current state of indexeddb so, it looks like the relationship information in localforage loses the type.
I almost wonder if this adapter should just use jsonapi for storage, since it's the most semantically correct for relational data.
The text was updated successfully, but these errors were encountered:
Yeah, jsonapi is the one true way.
all the information is just right there :)
Just need to figure out how to get serialization and deserialization working better.
On the plus side, with jsonapi, we can delete the serializer for localforage-adapter :)
Sorry, something went wrong.
No branches or pull requests
Not sure if this'd be solved in adapter-space, or if I've configured something wrong. But I have the following models:
Identity
User
Contact
Message
My Adapter and Serializer config:
The problem I'm having is that I have a
Message
with sender id of a contact.Here is the current state of indexeddb
so, it looks like the relationship information in localforage loses the type.
I almost wonder if this adapter should just use jsonapi for storage, since it's the most semantically correct for relational data.
The text was updated successfully, but these errors were encountered: