AlexB
AlexB

Reputation: 3548

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

Upvotes: 0

Views: 69

Answers (1)

wolf4ood
wolf4ood

Reputation: 1949

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

Upvotes: 1

Related Questions