1
0
Fork 0

fixed db.collection.document(collection / key)

This commit is contained in:
Jan Steemann 2013-01-13 12:38:12 +01:00
parent 975ef80e99
commit 35a58d4a69
2 changed files with 7 additions and 2 deletions

View File

@ -217,7 +217,7 @@ static int RevisionKey (TRI_key_generator_t* const generator,
current += TRI_StringUInt64InPlace(revision, current);
}
else {
char numBuffer[22];
char numBuffer[22]; // a uint64 cannot be longer than this
size_t length;
length = TRI_StringUInt64InPlace(revision, (char*) &numBuffer);

View File

@ -1109,6 +1109,11 @@ function ArangoCollection (database, data) {
////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype._documenturl = function (id) {
var s = id.split("/");
if (s.length == 1) {
return this._database._documenturl(this.name() + "/" + id, this.name());
}
return this._database._documenturl(id, this.name());
};
@ -1729,7 +1734,7 @@ function ArangoCollection (database, data) {
}
if (rev === null) {
requestResult = this._database._connection.GET(this._documenturl(this._name + "/" + id));
requestResult = this._database._connection.GET(this._documenturl(id));
}
else {
requestResult = this._database._connection.GET(this._documenturl(id),