getoutreach / epf

A framework for keeping your Ember.js apps in sync.
http://epf.io
MIT License
369 stars 33 forks source link

Client_Id and Client_Rev Purpose #120

Open jarredwitt opened 10 years ago

jarredwitt commented 10 years ago

I'm pretty new to EPF but I couldn't find a clear answer for this, but would it be possible for someone to explain to me the purpose of Client_Id and Client_Rev? Am I supposed to include it when writing to my backend? Am I supposed to return it in the REST response? Or is just solely for the client side?

The reason I ask is that I get some weird issues such as blank model records (using mongodb with embedded hasMany) when returning data that has the client_id and the client_rev in the response. The issues go away when I remove those from the response.

ghempton commented 10 years ago

Client_id and client_rev are both just pass through properties. Both are used during merge. Client rev is used by the client to know if the server has seen the most recent changes and client id is used to handle some creation corner cases caused by the ids being generated on the server. Can you elaborate on the case where issues are arising?

jarredwitt commented 10 years ago

Strange, I can't seem to reproduce the behavior any longer. I did make a lot of changes to my app so it could have easily been something that I did that caused the issue first place or possibly an extreme edge case. Sorry for the false report.

Thanks for answering my question. If the behavior pops back up I'll reopen.