Skip to content

subscriptions should support MongoDb ObjectIDs serialization #25

Description

@apheliagames

just tried to use some MongoDB ObjectId fields in a subscription....
here's an example class:

public class TestObjectID :MongoDocument
    {
        // Global properties
        public ObjectId TestID { get; set; }
        public string name { get; set; }
        
    }

i needed this for cross-referencing to other collections.

it gets serialized, but the TestID object itself gets only an empty ObjectId "000000000000000000000000".

I should mention, that the document itself, so the _id Object ( in the same format and written by mongodb driver) gets serialized well at all.

All fine when i change back to strings, but it would be a nice feature for security reasons...

Maybe it should be implemented in future releases. Very useful for developers who are handling MongoDB document r/w directly on the backend....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions