Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4870

Side-loading data is inconsistent

$
0
0

I am side loading relationship data in a table in a component. There are two nested relationships, like this…

    <tbody>
      {{#each @customer.borrowerBorrowerRelationships as |relatedBorrower|}}
        {{#each relatedBorrower.borrowerAccountRelationships as |relatedAccount|}}
          <tr {{on "click" (fn this.getBorrower relatedBorrower.borrowerId)}} role="button">
            <td class="pull-right">{{relatedAccount.accountNumber}}</td>
            <td title="{{relatedBorrower.borrowerId}} - {{relatedBorrower.name}} - {{relatedAccount.borrowerType}} - {{relatedAccount.borrowerAccountStatus}}" class="pull-left">
              {{relatedBorrower.name}}
            </td>
            <td class="center">
              {{relatedAccount.borrowerType}}
            </td>
            <td class="center">{{relatedBorrower.language}}</td>
          </tr>
        {{/each}}
      {{else}}
        <tr>
          <td>NONE</td><td></td><td></td><td></td>
        </tr>
      {{/each}}
    </tbody>

The JSON looks like this. We are using RESTAdapter.

[{
	"id":279815
	,"name":"Aliquis Smith"

	...

	,"borrowerAccountRelationships":[186046]
	,"borrowerBorrowerRelationships":[279816]
	,"borrowerPhones":[440184]
	,"borrowerEmails":[66300]
	,"customerAddresses":[213544]
	,"skillsRequiredToCallBorrower":[9]
}]

Frequently this data will not load, even though there are key values in the relationship array, and the table will be blank. Reloading the page always results in a correct load.

This is the only place in the app, currently, where I am nesting relationship data.

I’m happy to provide more information.

Thanks.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles