Manually mapping Realm Objects to Documents


How would one go about manually creating collections and documents from an existing realm? Or. How can I export from my current Realm and import the dataset into Atlas? How should I construct that code?

I’m asking because I could get a head start in making a new Blazor server app for an existing realm cloud solution. The plan is to be ready with this app when Mongo is ready with MongoDB Realm at which point I would then be able to connect the Blazor app (with perhaps minor changes) to the realm database already in production.

I have a broad idea how this is going to work. But how do I handle backlinks for example ? Are there any best practices, anything I need to be aware of?

I should mention that I’m new to MongoDB.

@Brian_Munkholm Could you extend fx. Realm studio with a Realm export that could be imported as an Atlas DB? Any tooling would be appreciated so one could begin working with MongoDB using the .NET Driver.

Hi Tim,
There won’t be an export function in Studio (at least initially). But if you have a local Realm you would be able to sync that directly into MongoDB with the JS SDK.

How? Is there a blog, a gist, some doc explaining the concepts involved, a sample ?

I’m afraid you will need to be a bit patient for now. We haven’t released the beta for syncing with MongoDB yet, and therefore also no documentation. Expect to see announcements on this at MongoDB World 2022 | June 7-9, 2022 | MongoDB

Øv :slight_smile:

Thanks Brian.