MongoFramework icon indicating copy to clipboard operation
MongoFramework copied to clipboard

QUESTION: MongoDB Client [BsonElement] Attibute

Open dthk-cogmatix opened this issue 5 years ago • 2 comments

Does MongoFramework work in conjunction with MongoDB Client Attributes, such as BsonElement?

I'm running into an issue where I need to support private setters, and I'm adding the [BsonElement] with no luck.

dthk-cogmatix avatar Jan 07 '20 03:01 dthk-cogmatix

Unfortunately as of 0.18.0 with it dropping MongoDB automapping, it no longer has support for the MongoDB client attributes.

For the BsonElement attribute specifically though, I could add similar support for forcing a field to be mapped if it has the Column attribute. Currently this attribute is only used for defining an element name however support for the attribute constructor with no name specified wouldn't be too hard.

Turnerj avatar Jan 07 '20 03:01 Turnerj

Yes, please.

After the bsonelement didn’t work, my natural next step was to try the column attribute. That didn’t work either, but support would make sense.

Sent from my iPhone

On Jan 6, 2020, at 9:43 PM, James Turner [email protected] wrote:



Unfortunately as of 0.18.0https://github.com/TurnerSoftware/MongoFramework/releases/tag/0.18.0 with it dropping MongoDB automapping, it no longer has support for the MongoDB client attributes.

For the BsonElement attribute specifically though, I could add similar support for forcing a field to be mapped if it has the Column attributehttps://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.schema.columnattribute?view=netframework-4.8&viewFallbackFrom=netstandard-2.0. Currently this attribute is only used for defining an element name however support for the attribute constructor with no name specified wouldn't be too hard.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/TurnerSoftware/MongoFramework/issues/125?email_source=notifications&email_token=AM7OTFXAHV77FE7X3VIQRK3Q4P237A5CNFSM4KDQEBH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIHS37Q#issuecomment-571420158, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM7OTFU4KA6IEL67ZDCUUE3Q4P237ANCNFSM4KDQEBHQ.

dthk-cogmatix avatar Jan 07 '20 04:01 dthk-cogmatix