yojimbo87 / ArangoDB-NET

C#/.NET/Mono driver for ArangoDB
MIT License
107 stars 66 forks source link

Specified 'id' value (abc.def) has invalid format. #44

Closed jeff-pang closed 7 years ago

jeff-pang commented 7 years ago
var result = db.Document.Get<UserInfo>($"Users/{userId}");

If userId with value "abc.def" is supplied an exception Specified 'id' value (Users/abc.def) has invalid format. will be returned. However this is a valid id and using AQL as follows will work

var result = db.Query
                  .BindVar("userId", userId)
                  .Aql("FOR u in Users FILTER u._key == @userId RETURN u")
                  .ToObject<UserInfo>();
yojimbo87 commented 7 years ago

This seems to be a bug in key format checking regex which doesn't allow some punctuation characters stated in key naming conventions. I'll try to fix it today or tomorrow.

jeff-pang commented 7 years ago

Thanks but no hurry.

yojimbo87 commented 7 years ago

Fixed in master branch.