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

method .all() not returns pure literal object from database (store) #177

Open
creaux opened this issue Apr 17, 2021 · 0 comments
Open

method .all() not returns pure literal object from database (store) #177

creaux opened this issue Apr 17, 2021 · 0 comments

Comments

@creaux
Copy link

creaux commented Apr 17, 2021

I'm trying to understand without digging deeply what exactly following method returns:

this.$store.$db().model("someModel").all()

I would expect as based on familiarity with Redux that this will be pure object literal only with properties based on model. But it is not the case it actually returns even these properties:

{
  $id: '1',
  $isPresitant: false,
  $self: ...
  ...
}

Somewhere else we define model.

class SomeModel extends Model { }

So looks to me like instance of SomeModel. Which is fine as it can be sanitized for example by remaping properties.

But I really wonder that I haven't found yet more sophisticated solution which incorporated directly to VuexORM or do I missing something?

@creaux creaux changed the title method .all() returns not pure literal object from database (store) method .all() not returns pure literal object from database (store) Apr 17, 2021
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

1 participant