-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with id #45
Comments
I could very well be wrong, but I believe this is a limitation with how graphs work (at least in CosmosDB). I am having difficulty finding documentation to support this, however. My team have set our ids to custom properties instead of using the built-in "id" field. |
Just to be clear, did this used to work before the latest version? |
Yes it did work , The id field was included in VertexBase which you inherited. I have managed to get it to work using: |
This obviously forces it to serialise the Id field as id. |
Do note though, that the native id property is not indexed the same way as custom properties, and if you're working with partitioned data, there might be significant performance to be gained by also storing the id in a custom property (my team uses the name idx.) |
Thanks for the replies, I think I'll go back to using the old version 0.3.4.2-rc1 due to the problems with this latest version, see #46 . still think its a great lib. |
In the latest version 0.3.4.3-rc1 I have converted to using IVertex, so my vertex now includes Id:
public class Site : IVertex { public string Id { get; set; } public string SiteName { get; set; } }
However, when I create a site with a specified id, the id gets assigned a GUID and Id appears as a separate property in the database.
How do set the DB id to a specified value?
The text was updated successfully, but these errors were encountered: