atheken/NoRM

the propertyname dosen't convert to the alias in class ModifierExpression class.

Opened this issue · 0 comments

I add a MongoConfigurationMap to the MongoConfiguration trying to let the prop name starts with lower case and shorter.when I insert a model to mongodb,it works. it make my prop name from" Comments" to "comms". great job!
I wrote the code like this when I Update the model,and push some comment into the comment list:

Collection.Update(new { _id = item.ID }, act =>
{
        act.PushAll(i => i.Comments, tba.ToArray());
 }, false, false);

I run this code, and I found a new field added in my data in my mongodb called "Comments", and my "comms" field which registered in the MongoConfiguration is still a empty array.

I find the code in the ModifierExpression class,it ask the ReflectionHelper.FindProperty method and returns the real name of the C# model,but you don't convert it to the alias.

I don't know this is a bug or not.