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

Option to require response on fetch #7

Closed
tgriesser opened this issue Apr 30, 2013 · 0 comments
Closed

Option to require response on fetch #7

tgriesser opened this issue Apr 30, 2013 · 0 comments

Comments

@tgriesser
Copy link
Member

Shortcut for making an error condition (failed promise) when an empty response is returned by the fetch call...

model.fetch({require:true});
collection.fetch({require:true});

Possibly applies to eager loaded relations:

model.fetch({
   withRelated: ['recommendations.rec_rows', 'recommendations.caption_rows'],
   requiring: ['recommendations.rec_rows']
})

Meaning that if the model, recommendations or "rec_rows" is blank, the promise won't resolve... Any cases where this would be necessary?

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