Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20577

Windows: App crashes when calling fetch() on any collection that has data

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.2.0
    • Fix Version/s: Release 5.2.1, Alloy 1.8.1
    • Component/s: Windows
    • Labels:
    • Environment:
    • Story Points:
      8
    • Sprint:
      2016 Sprint 06 SDK

      Description

      Creating a collection, and calling fetch if it is emtpy doesn't crash. Create 1 model and save it, then re-fetch the collection the app crashes in the emulator. This is a pretty serious issue if you can't fetch any data?!

      Not sure what version this dates back to as we're new to windows dev in Titanium. We're adding windows support to longstanding iOS/Android Ti apps.

      Index.js:

      var library = Alloy.createCollection("userForms");
      library.fetch();
       
      var user = Alloy.createModel('userForms', {
      	Name: "Hello world"
      });
      user.save();
       
      library.fetch();
       
      $.index.open();
      

      Model:

      config: {
      		columns: {
      		    "Name": "TEXT"
      		},
      		adapter: {
      			type: "sql",
      			collection_name: "userForms"
      		}
      	}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                joef Joe Finnigan
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-7056
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code