Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-456

Support multiple databases in sql adapter


    • Type: Improvement
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Alloy 0.3.5, 2013 Sprint 02
    • Component/s: Runtime
    • Labels:
    • Environment:

      Titanium 3.0.0.GA, Alloy 0.3.4



      Alloy will support multiple sqlite databases in an app one of two ways:

      1. By adding the db_name property to the definition.adapter object to identify the name of the database you would like to use/create. See here: [LINK COMING]
      2. By loading from an existing database with the db_file field (from ALOY-345). Alloy will automatically use the basename of the file as the database. So if your db_file is "myapp.sqlite", then alloy will automatically use "myapp" as the database for all operations.

      It would be nice to be able to pass a database filename as part of the model.config.adapter when creating a SQL model - instead of defaulting to the alloy database name. This would be helpful for situations where we might want to have multiple databases with differing configurations - for example: one database which is shared over iCloud, and one which is unshared and stored in the cahe directory.


          Issue Links



              • Assignee:
                simon.giles Simon Giles
              • Watchers:
                2 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration