Provide example of using bufferedProxy on records with relationships
See original GitHub issueHi! Thank you for you your awesome project.
I wonder whether i can use ember-buffered-proxy on Ember Data records.
My use case:
- A record is created clientside when a user visits the route. The record will eventually be persisted to the backend, but during this use case it does not.
- The user opens a modal dialog with an edit form, edits the record and presses OK in the form to close the dialog. From the user perspective, he has kinda saved his edits, and the record is now in state A.
- The user can open the form and edit the record again. The record is now is in state B. If he messes up, he should be able to discard his edits by pressing Cancel instead of OK. I cannot use
.rollback()because it will revert the unsaved record to a tabula rasa state, while the user expects it to be reverted to state A.
My problem is that the record in question does not store much data itself: all its data comes from related child and grandchild records.
Does this mean that i have to apply discardBufferedChanges recursively? Is there a simpler way?
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Issues · yapplabs/ember-buffered-proxy - GitHub
Contribute to yapplabs/ember-buffered-proxy development by creating ... Provide example of using bufferedProxy on records with relationships.
Read more >Guide to table relationships - Microsoft Support
A one-to-many relationship. Let's use an order tracking database that includes a Customers table and an Orders table as an example.
Read more >Considerations for Relationships - Salesforce Help
You can create a relationship from an object to itself, but it must be a lookup relationship, and a single record can't be...
Read more >Add Record Type Relationships - Appian 21.2
For example, let's say that the Customer and Order record types are related, and in the database tables that they use, the Order...
Read more >Many-to-many relationships
A many-to-many relationship occurs when multiple records in a table are associated with ... Using the example above, create a table named Enrollments....
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

I struggle to figure out how to do that. Can you please provide an example?
I think using
bufferedProxyon records is a popular use case and a publicly available example will be very useful.Having an example on how to use this on a model would be great. I’m also struggling with this issue.