ArangoDB 2.5 can't save document with field value which contains colon sign
210 views
Skip to first unread message
Tomas Bosak
unread,
Mar 16, 2015, 5:15:39 AM3/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aran...@googlegroups.com
Hi folks,
it seems like in ArangoDB 2.5 documents with fields that contain colon sign in their values, e.g.
{
"field": "a:"
}
cannot be saved (tried through web interface) and returns error:
code: 400
error: true
errorMessage: "invalid document type"
errorNum: 1227
Jan
unread,
Mar 16, 2015, 5:26:18 AM3/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aran...@googlegroups.com
Hello,
I don't think this is the case. It works when I try it and I don't see any reason for why a colon inside a value wouldn't work. I think the error "invalid document type" is thrown when trying to save a non-edge (i.e. an object missing "_from" or "_to") in an edge collection.
Can you check whether this is the case?
Best regards Jan
Tomas Bosak
unread,
Mar 16, 2015, 5:38:05 AM3/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aran...@googlegroups.com
Hi Jan,
tried it now with newly created document type collection (with default configuration in _system database) through web interface and inserted the document with same result (400 on PUT).
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aran...@googlegroups.com
I can confirm it works fine using the `collection.save()` and `collection.update()` etc methods and the REST API.
To me the request payload looks like a JSON string. But I think it should rather be a JSON object. So it might be an issue in the web interface only. I'll have that checked and fixed if this is the case.
Tomas Bosak
unread,
Mar 16, 2015, 5:55:05 AM3/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aran...@googlegroups.com
That might be the case since when I save just { foo: "bar" } the payload looks like this:
{"foo":"bar"}
However when I want to save { foo: "bar:" } the payload is:
"{\n \"foo\": \"bar:\"\n}"
Ke Rn
unread,
Mar 16, 2015, 6:24:41 AM3/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aran...@googlegroups.com
Hi,
it is now fixed in the devel branch and 2.5 branch. Thanks for the hint.