question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CosmosDB: Guid IDs instead of object IDs of Vertex?

See original GitHub issue

Is there any sample / way we can work with a typed value like Guid instead of object? for the Vertex Id? Object is extremely error-prone…

We have already tried to work with Guid directly or a struct-based abstractions. This works so far on reading, but on vertex writing diff argument exceptions are thrown like

Gremlin.Net.Driver.Exceptions.ResponseException: InvalidRequestArguments: 

ActivityId : a6f0053f-ab75-4b99-92bb-6f0934182c84
ExceptionType : ArgumentException
ExceptionMessage :
	Value of variable _b is not a constant type. Cannot assign complex values to groovy variable. (Parameter 'value')
Source : Microsoft.Azure.Cosmos.Gremlin.Core
	HResult : 0x80070057

We could not find any reference to this in the docs either.

Thanks for your help!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
danielcwebercommented, Feb 17, 2021

Immutability is king. Everything is immutable. If you call something on e and return e, you’ve done nothing. Return the result of Configure.XYZ.

2reactions
danielcwebercommented, Feb 16, 2021

BTW the IVertex interface does not have to be used. Gremlinq is just fine without. Of course, IVertex defines the object Id in the first place but it’s not necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using a GUID as entity Id vs the entity's "actual" Id
of the respective object, so I'm wondering if there are any issues with using i.e. EmployeeId as both the partition key and Id?...
Read more >
Azure Cosmos DB for Gremlin support and compatibility ...
Azure Cosmos DB supports Apache Tinkerpop's graph traversal language, ... Vertex property features, StringIds, UserSuppliedIds, AddProperty, ...
Read more >
Preventing Headaches with Cosmos Document IDs
The following simple tip regarding Cosmos DB's document identifier property may help you avoid creating a hard-to-find bug in your code.
Read more >
accessing a graph in Cosmos DB with SQL / DocumentDB API
We provided the ids of objects ; this isn't always possible in graph databases but is possible with Cosmos DB (if we don't...
Read more >
Change two bytes in a GUID
Coding example for the question Change two bytes in a GUID. ... How can I use a GUID as ID in CosmosDB when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found