Gremlinq / ExRam.Gremlinq

A .NET object-graph-mapper for Apache TinkerPop™ Gremlin enabled databases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

double[] is not supported

jiatao99 opened this issue · comments

Trying to add Vocalno sample data into cosmos

    public class Volcano
    {
        public string Name { get; set; }
        public string Region { get; set; }
        public string Country { get; set; }
        public int? Elevation { get; set; } 
        public string Type { get; set; }
        public string Status { get; set; }
        public string LastKnownEruption { get; set; }
        public Location Location { get; set; } = new Location();
        public string id { get; set; }
    }

    public class Location
    {
        public string type { get; set; }
        public double[]? coordinates { get; set; }
    }

If I use add it as one object, I got the can not assign complex data to value exception.

foreach (Volcano d in data)
    await g.AddV(d).FirstAsync();

Cannot assign complex values to groovy variable. (Parameter 'value')

Another error I got is that if try to add just Location object into a different graph I got the double[] not support exception:

foreach (Volcano d in data)
    await gLocation.AddV(d.Location).FirstAsync();

System.NotSupportedException : A value of type System.Double[] is not supported for property 'ExRam.Gremlinq.Core.Key'.

This should actually work since double is a native type (I guess for the provider you are using, since you didn't provide a complete working example as kindly requested). If this is still relevant, please reopen.

Hello @jiatao99,

thanks for your interest in ExRam.Gremlinq. The issue was labelled "Repro repository missing" because although the issue template asks for either "a link to GitHub repository containing a minimal executable project structure that exposes the unexpected behaviour" or "a pull request to ExRam.Gremlinq that adds a failing unit test to the ExRam.Gremlinq tests asserting the expected behaviour", it seems you provided neither. Most problems already solve themselves when isolated and if they don't, you will have made it easier for the maintainer of this project to investigate a possible bug.