Closed israelins85 closed 7 years ago
I'm using for display data in a list that code:
Model declaration
var dbConn = new QuickModel.QMDatabase('MyProject', '1.0'); var Documento = dbConn.define('Documento', { conteudo: dbConn.String('Conteudo', {accept_null:false}), dtHrInclusao: dbConn.DateTime('Data/Hora de Inclusão', {accept_null:false, 'default': 'CURRENT_TIMESTAMP'}), dtHrExclusao: dbConn.DateTime('Data/Hora de Exclusão') });
Adding a documents (works fine)
var l_doc = Model.Documento.create({conteudo: a_data}); documentsModel.append(l_doc);
Error here when I try to update:
var l_doc = documentsModel.get(a_itemIndex) l_doc.dtHrExclusao = new Date(); l_doc.save(false);
Error is Property 'save' of object QObject(0x7fdb0ed50c90) is not a function
var l_doc = Model.Documento._makeObject(documentsModel.get(a_itemIndex)) l_doc.dtHrExclusao = new Date(); l_doc.save(false);
But same error;
Only works with:
var l_doc = documentsModel.get(a_itemIndex) Model.Documento.filter({id: l_doc.id}).update({dtHrExclusao: new Date()});
Hey, This project is not under active maintenance anymore. But if you find a way to fix it, feel free to send a pull request.
I'm using for display data in a list that code:
Model declaration
Adding a documents (works fine)
Error here when I try to update:
Error is Property 'save' of object QObject(0x7fdb0ed50c90) is not a function
But same error;
Only works with: