-
Notifications
You must be signed in to change notification settings - Fork 67
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
What does save and save! method do? #96
Comments
Because the ArrayModelAdapter is moving stuff around in volatile memory, you do have to explicitly call the persistence methods to store the data in nonvolatile memory. This was an implementation decision that may seem jarring if you are used to Rails and discrete saves to NV storage. In our case, I didn't want to presume anything that might negatively impact performance. Does this help explain? |
As a newbie its confusing for sure, it took me a while to realize that save is not actually "saving". May be adding a note to save documentation would help. Also may be a design change where serialization is provided out of the box (but made optional) would help. |
There is an example under notifications that should give you a good idea how to make save mean save. But point taken about the README. If you want to take a crack at it and submit a pull request, that would be great. |
Ok I will take a look. Also what does |
There are two branches. Master requires you include the ArrayModelAdapter. The SQL branch uses FMDB and the SQLite database. You should look at the example and docs in the SQL branch if you want to use that. To answer your question, ArrayModelAdapter provides finder, persistence etc. specific to the backing store. |
So does that mean |
I am new to RubyMotion/MotionModel and was looking at different persistence options.
I came across this issue #12 and this recommends calling serialize/deserialize explicitly.
If thats the case then what does method
save
&save!
do?The text was updated successfully, but these errors were encountered: