[AC-1760] Alloy: Default model creation throws column-type warning
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-03-03T02:50:16.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Studio |
Labels | adapter, alloy, sqlite, studio, titanium |
Reporter | Hans Knöchel |
Assignee | Ritu Agrawal |
Created | 2014-02-22T13:07:17.000+0000 |
Updated | 2016-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.
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.
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.
I checked my console output and still cannot see the error. Would it be possible for you to attach your console output?
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.
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!