[AC-3291] Alloy Framework Model/Database - Some Docs or Features missing
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Done |
Resolution Date | 2015-09-30T01:10:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Documentation, Titanium SDK & CLI |
Labels | n/a |
Reporter | Shawn Lan |
Assignee | Shak Hossain |
Created | 2015-04-22T01:18:27.000+0000 |
Updated | 2016-03-08T07:57:42.000+0000 |
Description
With Alloy Framework, the following features regarding Model/Database are either missing or not properly documented. (They are all available in Titanium Classic)
1. DB file remoteBackup property. How do we set this property properly? I've seen someone doing this:
exports.definition = {
config : {
"adapter":{
"remoteBackup":false
}
}
}
But I couldn't find this in the documentation. Does it work? If it works, how do I change this property back and forth? Just modify the value above and it will take effects?
2. If Alloy saves the db file in internal memory by default (Android), how to choose external storage instead?
3. The documentation doesn't show any explicit method to close database connection. Does Alloy handle this automatically? If using Alloy's data binding, does the database connection close only after the view closes? If that's the case, that's too memory-consuming. The opened view may not need the database connection all the time. In Titanium Classic, I can control when to open/close a database connection.
Hello, Tested your issue. Alloy uses [Backbone.js ](http://docs.appcelerator.com/backbone/0.9.2/#Model) to provide support for [models and collections](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Collection_and_Model_Objects) .Alloy also borrows the concepts of [migrations and adapters](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Sync_Adapters_and_Migrations) from Rails for storage integration. Thanks
Please, you didn't address any question I have in this ticket. Please re-open this ticket. Thanks.