OrleansContrib / Orleans.Providers.MongoDB

A MongoDb implementation of the Orleans Providers: Membership, Storage and Reminders.
MIT License
100 stars 43 forks source link

Now i have _doc as inner property. i am want to have all internal properties on top level (as columns) #101

Closed P9avel closed 1 year ago

P9avel commented 1 year ago

I am want save all without _doc property. How to do it?

Безымянный

SebastianStehle commented 1 year ago

It is not possible or not easily possible:

Somehow you have to create a object and you have the following properties from Orleans:

First of all the value could be a primitive, like string, but even if it would be a document it would be tricky to convert it to a flat document. Lets say you have the following value

class MyValue
{
   [JsonProperty("_id")]
   public string Id {get; set; }
}

Then your Id would overlap with the mongodb _id which is basically the grain identity and you would have a conflict here. It is not worth to handle these details. For MongoDB it does not really matter and you can get a better Management Tool like Studio3T.

P9avel commented 1 year ago

Many thanks for quick answer. I am understood now