Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

There's no such table when create new alloy model.

$
0
0

Before creating the model object I always drop tables first like this

db.execute(' DROP TABLE IF EXISTS Products;');
db.execute(' DROP TABLE IF EXISTS Models;');
but when I try to create model from Products or Models, it always throws an exception "There's no such table" exception
var products = Alloy.createCollection('Products');
var product = Alloy.createModel('Products', {
                    fields..
});
product.save();
products.fetch();
, and I know that when creating a model it creates table in DB automatically, so what am I doing wrong?

I'm using titanium sdk 3.4.1 thanks..


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>