-
Notifications
You must be signed in to change notification settings - Fork 37
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
Arango db field casing issue with linq queries #39
Comments
the reason that
also there are helper methods in .net client that you can override member name resolving( which does not solve your problem, you should rename sharedSetting.Collection.ChangeCollectionPropertyForType<Person>(x =>
{
// will resolve all collection members name from PascalCase(c#) to camelcase(ArangoDB)
x.Naming = NamingConvention.ToCamelCase;
});
sharedSetting.Collection.ChangeDocumentPropertyForType<Person>(x => x.LastName, (p) =>
{
// set the name for just one member
p.PropertyName = "lastName";
// naming convection for just one member
p.Naming = NamingConvention.ToCamelCase;
}); |
thanks for prompt and detailed response. However, I hope that you see why I find this confusing. From my perspective it would be better if this behavior was more consistent i.e. either arango lastName wouldn't be mapped to LastName in C# while using db.Query().ToList() or if field content was included while using db.Query().Where(e => AQL.Contains(e.LastName, "b")).ToList() |
you're right, the resolving names should be consistent either in serializing/serializing, i wont close the issue for now. |
@adamlubek about consistent member name resolving, json.net behaves |
hey, first of all, thanks for cool library :)
Down to business: in arango, I've got Person collection with last name fields (notice second object's field starts with lower case):
[{"LastName":"a"},{"lastName":"b"},{"LastName":"c"}]
In C#, I've got Person class with LastName field.
Now, db.Query().ToList() returns all 3 objects with LastName properly initialized with respective values. However, linq query db.Query().Where(e => AQL.Contains(e.LastName, "b")).ToList() doesn't return anything. I'm guessing this is not intentional?
The text was updated successfully, but these errors were encountered: