You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe I've discovered a serious bug in the RESTAdapter and would therefore like to report it.
Been struggling now for many days trying to figure this out, and have finally resolved the issue (I hope).
It has to do with a nested one-to-many relationship with belongs-to referring back to the parent (which is what is causing the problem, I believe).
When I remove item: DS.belongsTo('item', {async: true} ) in my App.Key model, it works!
This ONLY occurs when I have the RESTAdapter enabled and NOT when using the identical code with fixtures, e.g. using App.ApplicationAdapter = DS.FixtureAdapter.extend({});
That's why I suspect that it is a bug in the RESTAdapter unless I'm doing something wrong.
It could have something to do with my usage of this.modelFor('item').get('keys') but this works just fine with fixtures.
Here's the problem:
/folders => ok
/folders/A/items => ok
/folders/B/items => ok
/folders/A/items => nok (no keys)
/folders/B/items => ok
/folders/C/items => ok
/folders/B/items => nok (no keys)
/folders/C/items => ok
...
As you can see, only the last item route which has resulted in a REST request retains it's key list, while all other items in the list become emptied.
This only affects the items, and selecting different folders back and forth has no affect on the items lists.
Would it be possible to post some sample response data or a simplified test case? I tried to get the python server in the zmail-client repo running but I was unable to successfully install the MAPI dependency.
Wow, this was quite some time ago and not sure if I remember enough to come up with a correct test demo. Perhaps I can mock the response in order to reproduce.
I believe I've discovered a serious bug in the
RESTAdapter
and would therefore like to report it.Been struggling now for many days trying to figure this out, and have finally resolved the issue (I hope).
It has to do with a nested one-to-many relationship with belongs-to referring back to the parent (which is what is causing the problem, I believe).
When I remove
item: DS.belongsTo('item', {async: true} )
in myApp.Key
model, it works!This ONLY occurs when I have the
RESTAdapter
enabled and NOT when using the identical code with fixtures, e.g. usingApp.ApplicationAdapter = DS.FixtureAdapter.extend({});
That's why I suspect that it is a bug in the
RESTAdapter
unless I'm doing something wrong.It could have something to do with my usage of
this.modelFor('item').get('keys')
but this works just fine with fixtures.Here's the problem:
As you can see, only the last item route which has resulted in a REST request retains it's key list, while all other items in the list become emptied.
This only affects the items, and selecting different folders back and forth has no affect on the items lists.
This is my data model:
This is what my router map looks like:
Here are my routes:
Here is my configuration:
Details of my environment:
Thanks alot in advance for having a look. I hope that I have provided sufficient information to figure out what's wrong and fix it.
See: https://github.com/kgish/zmail-client
The text was updated successfully, but these errors were encountered: