Search code examples
orientdborientjs

OrientDB v2.1.8(latest) insert request error with OrientJS 2.11.2(latest)


I am using OrientDB v2.1.8 and OrientJS 2.0.0 driver. When I try to use the orientjs insert query builder, I get an OrientDBRequest error. Why is this happening ? How can I fix this ?

Code :

db.insert()
    .into(req.params.groupClass)
     .set(req.body)
     .one()
     .then(function (group) {
         createdGroup = group;

         setGroupOwner();
         addGroupMember();

         res.json(group);
     });

Error output :

enter image description here


Solution

  • 'desc' is a reserved keyword in SQL syntax. You should name your field like description (or something else) or could use backticks.