Getting Vertex by Type
See original GitHub issueHi, I am just trying out Exram.Gremlinq for size, And i am struggling a with some pretty basic stuff. been through the samples numerous times now but i just can’t figure out what i am doing wrong.
Using cosmos db and are trying to create a simple CRUD endpoint for some accounts. I got the connection running and is fully able to create new vertexes. They appear as expected quering them using the data explorer in azure.
But i cannot retrieve them again.
I try to get all accounts using below query. But it returns an empty list.
var accounts = _g.V<Account>();
return await accounts.ToListAsync();
Steps from above query.
I have a similar issue when retrieving vertexes by id. The collection returned is empty.
var accountQuery = _g.V<Account.Account>().Where(v => v.Id == id.ToString());
var account = await accountQuery.FirstOrDefaultAsync();
Steps from above query
I Setup my connection like this.
// setup connection
this._g = g.UseModel(GraphModel.FromBaseTypes<Vertex, Edge>()).UseCosmosDb(hostname, database, collection, authKey);
–
It is not clear to me how i can further debug query generated.
Any help or pointers would be greatly appreciated.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
Sorry, didn’t spot that.
Yes., You need to pass additional assemblies to FromBaseTypes, specifically those you need Gremlinq to find inherited types in, in your case something like
typeof(Account).Assembly
.Could you post a minimal working example project structure (as zip e.g.)?