findAll issue when resource returns empty collection
See original GitHub issueWhen using findAll
and specifiying idAttribute
in the model, if server returns empty collection, I get
“attrs” must contain the property specified by “idAttribute”.
I couldn’t find a way how to handle this case, or documentation related to this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
findAll returns empty set, logged raw query returns desired ...
The following query works: SELECT `Image`.`id`, `Image`.`title`, `Image`.`pageid`, `Image`.`url`, `Image`.`imageurl`, `Image`.
Read more >JpaRepository findAll returns empty List - java - Stack Overflow
The problem is that your properties are not mutable. You have exposed getters and setters but you didn't specify access level, ...
Read more >Finding resources to tag - AWS Tag Editor - AWS Documentation
The search is case sensitive. Leave the Tags boxes empty to find all resources of the specified type in the selected AWS Regions....
Read more >find( ) returning an empty object when called from a trigger
To get the data from the post collection, I'm executing post.find( ) but I'm getting an empty object. What am I doing wrong?...
Read more >Search Query Reference | YouTrack Server Documentation
To find all issues that are assigned to sprint 21 on the YouTrack Scrum board, enter Board ... Returns issues that do not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Tronix117 is right,
findAll
was expecting the response to be an array and was injecting it into the store. v2 provides a few hooks where you could instruct js-data to use that nested data field, and v3 has even more hooks. There isn’t a single answer on how you would approach this.Great, also don’t forget to include versions of
js-data
and adapters, in future issues, because there is some major changes with v3 and it behaves differently (not on this matter though)