Open grimace opened 5 years ago
Hi @grimace
how are you updating the vertex ?
Thanks
I'm using orientjs: in this, article contains a number of fields, there are 2 linklist fields:
content - has a list of RIDs for other Articles
tags - has a list of RIDs for Tags
res.locals.db.update(rid)
.set(article)
.one()
.then(update => {
console.log("Article updated - setting OwnsContent : "+rid+" , "+repo_id);
// let resultRid = update['@rid'];
res.locals.db.create("EDGE", "OwnsContent", "UPSERT")
.from(repo_id).to(rid)
.one()
.then(edge => {
console.log('created edge to repo : '+edge);
// article['@rid'] = rid;
cb(article);
}).catch(err => {
console.log('creating edge to repo failed for : '+rid);
});
})
.catch(err => {
console.log("Article update failed:", err);
error(err);
});
I have a Vertex ( Data ) that has a tags field ( LINKLIST ) which I'm storing as recordIDs - in string format like this:
When I update the Data Vertex I get an exception:
I really don't want to expand and replace the Vertices before saving the record to the DB. Is there a way to coerce these to @RIDs?