[ALOY-1349] Alloy Framework Model/Database - Some Docs or Features missing
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Models |
Labels | n/a |
Reporter | Shawn Lan |
Assignee | Bruce Wayne |
Created | 2016-01-07T18:36:40.000+0000 |
Updated | 2016-12-12T14:22:51.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.
1. That only works for a preload database. I'm talking about the databases defined by Alloy Model, but not preloaded. It seems there is no way to set remoteBackup for such databases. However, with Titanium Classic, I can do it. I suggest to add this feature into Alloy Model. 2. I'm not talking about creating databases using Titanium Classic. I'm talking about the databases defined by Alloy Model. Is there no way to choose the database path? Make it stored in an external storage? 3. Good to know. Thanks.