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

Problem during updation/removal of sqlite db operations?

$
0
0

Hi all, in alloy framework, model created as follows : exports.definition = { config: { columns: { "date": "text", "project_id": "INTEGER", "desc": "text",... adapter: { type: "sql", db_name: 'Calender', collection_name: "Calender" }

UPDATE Operation: updateDetailsbyId : function (tmp_prj) {
var collection = Alloy.createCollection('Calender');
var model = Alloy.createModel('Calender',{ date : tmp_prj.date, project_id : tmp_prj.project_id, desc : tmp_prj.desc, ... }); collection.add(model); model.save();

NOTE: there is no PRIMARY Key exists in this model, causes db to create one more row, instead of updating in existing row,

can it be acheived without primary key or is there any alternative to this????? (similar problem with removing particular row as well.)

further details : Application type:: mobile sdk :3.3.1 G.A., O.S. : mac 10.8.2 platform : issue is independent of platform version, as of now using iphone xcode verison : 4.6.3.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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