ArangoDB-NET icon indicating copy to clipboard operation
ArangoDB-NET copied to clipboard

Driver fails creating edge collection

Open berry4u opened this issue 6 years ago • 2 comments

With version 3.4 of Arangodb there is an issue creating a collection of "Edge" type. The collection created is always of Document type. This is due to the Json msg passed where the value of parameter "type" is "Edge" instead of 3. The same thing happens with Document type where the value passed is "Document" instead of 2 but in this case the mismatch has no effect since the default (type: 2) is applied.

berry4u avatar Jan 02 '19 14:01 berry4u

version 3.4.1 also have this issue.

in client ACollection.cs change EnumFormatObject to EnumFormat.Integer, recompile and progress your work, i'll try to commit it into git:

    public ACollection Type(ACollectionType value)
    {
        // set enum format explicitely to override global setting
        _parameters.Enum(ParameterName.Type, value, EnumFormat.Integer);
    	
    	return this;
    }

my repaired driver https://github.com/wedrowycz/ArangoDB-NET.git branch "fromwedrowycz"

wedrowycz avatar Jan 06 '19 15:01 wedrowycz

Hi, the actual problem here is, that the camel case was never documented to be supported. Lowercase-E should also work.

dothebart avatar Jan 07 '19 10:01 dothebart