How to change all Binary types to String in MongoDB using Java?

Hi @Emin_Can_OGUZ and welcome in the MongoDB Community :muscle: !

What’s in your MongoDB collection initially? Can you share one document maybe from mongosh? Are these _id fields really binary data or it’s actually ObjectIds?

I have a Java quick start repo here: GitHub - mongodb-developer/java-quick-start: This repository contains code samples for the Java Quick Start blog post series

Maybe this can help you getting up and running.

Cheers,
Maxime.

1 Like