-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[rfcs] - knowing when records are loaded or not #2431
Comments
We have a few situations we need to filter or check a relation based on the id, but don't need the entire relation loaded. One example of how we are using this is in the gist. This isn't related as much as to knowing if the records are loaded, but more towards the second part of your issue, knowing the id without requesting the full data from the server. https://gist.github.com/aaronbhansen/078c14ac65df6985bcd4 We might change our workflow depending on if we knew records were loaded or not, but since there hasn't been an easy way to do this so far, I don't have any code examples for your first half of the issue. |
This is copied from another issue (#2271), on determining relationship presence (somewhat related). Sometimes it's useful to determine if a relationship is present without querying the server. This private API works without querying the server: On knowledge of associated records Ways to provide this
I think I like (3) the most, but depends on whether others think that's a useful addition. |
emberjs/rfcs#57 is aiming to address this |
I think this issue can be closed since an initial implementation of references has been merged into |
@pangratz thank you! |
When people are trying to check for contains/etc. See if the relationship has been loaded without asking the server for the records. There is currently no API for this.
An example: has the post loaded its comments? if not I may want to make a different kind of query
What are the comment IDs? I may have not yet loaded the comments but I want to know their IDs without telling the server to load them.
We would like contributors to use this issue for use cases.
The text was updated successfully, but these errors were encountered: