Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1760] Alloy: Default model creation throws column-type warning

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-03T02:50:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Studio
Labelsadapter, alloy, sqlite, studio, titanium
ReporterHans Knöchel
AssigneeRitu Agrawal
Created2014-02-22T13:07:17.000+0000
Updated2016-03-08T07:40:39.000+0000

Description

The console throws a warning, after creating a model through Ti.Studio and then running the project. Steps to reproduce: 1. Create a new Alloy project 2. Create a new Model using the context-menu (New -> Alloy Model) 3. Select sql to be the adapter 4. Add a column "title" with the default value "string" and a column "id" with the value "int using the dropdown menu 5. Save the new model and compile Warning: [WARN] : "string" is not a valid sqlite field, using TEXT instead [WARN] : "int" is not a valid sqlite field, using INTEGER instead Possible fix: Change the mapping of the column-type or use the correct column-types per default in the dropdown.

Comments

  1. Ritu Agrawal 2014-02-24

    I followed the exact same steps and was not able to reproduce the issue. My environment is same as yours Mac OSX 10.8.5 Titanium SDK 3.2.1 GA Titanium Studio 3.2.1 Alloy 1.3.1 iOS 7.0.3 Here is the output of the new model exports.definition = { config: { columns: { "Title": "string", "id": "int" }, adapter: { type: "sql", collection_name: "Test" } }, extendModel: function(Model) { _.extend(Model.prototype, { // extended functions and properties go here }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { // extended functions and properties go here }); return Collection; } }; Please let me know if I am missing something.
  2. Hans Knöchel 2014-02-24

    Hey Ritu, did you compiled the source and checked the console? The type "int" should bei "INTEGER" and "string" should be "TEXT". Please check to watch the console on runtime, not on model-creation.
  3. Ritu Agrawal 2014-02-24

    I checked my console output and still cannot see the error. Would it be possible for you to attach your console output?
  4. Ritu Agrawal 2014-03-03

    Resolving this ticket as we cannot reproduce this issue. We would be happy to reopen it if you can provide more information on how to reproduce it.
  5. Michael Gangolf 2014-06-25

    Same here (Linux, Titanium SDK 3.2.3, TiStudio 3.2.3.201404181442). !http://www.migaweb.de/model1.jpg! !http://www.migaweb.de/model2.jpg! !http://www.migaweb.de/model3.jpg!

JSON Source