Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3291] Alloy Framework Model/Database - Some Docs or Features missing

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionDone
Resolution Date2015-09-30T01:10:22.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Documentation, Titanium SDK & CLI
Labelsn/a
ReporterShawn Lan
AssigneeShak Hossain
Created2015-04-22T01:18:27.000+0000
Updated2016-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.

Comments

  1. Rakhi Mitro 2015-09-07

    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
  2. Shawn Lan 2015-09-30

    Please, you didn't address any question I have in this ticket. Please re-open this ticket. Thanks.

JSON Source