Trying to use ObjectRef with Java Connector to link two tables

I’m trying to use the java connector to create a link between two tables

mongoClient = MongoClients.create(uri);
db = mongoClient.getDatabase("testing");

MongoCollection<Document> hobby = db.getCollection("hobby");
hobby.drop();
InsertOneResult gaming = hobby.insertOne(new Document("name", "gaming"));
InsertOneResult running = hobby.insertOne(new Document("name", "running"));

MongoCollection<Document> coll = db.getCollection("coll");
coll.drop();
coll.insertMany(
    Arrays.asList(
            new Document("name", "Max").append("age", 24).append("hobby_id", gaming.getInsertedId()),
            new Document("name", "Alex").append("age", 25).append("hobby_id", gaming.getInsertedId()),
            new Document("name", "Claire").append("age", 19).append("hobby_id", running.getInsertedId()))
);

image

As you can see, it detects the hobby_id as an objectId, but doesn’t link the tables together.
Is there some other way to do this without using POJO?

This is what I’ve come up with to fix this issue:

    Object getRef(InsertOneResult result) {
        MongoCollection<Document> hobby = db.getCollection("hobby");
        return hobby.find(eq("_id", result.getInsertedId())).first();
    }

    public MongoDbTesting(String uri) {

        mongoClient = MongoClients.create(uri);
        db = mongoClient.getDatabase("testing");

        MongoCollection<Document> hobby = db.getCollection("hobby");
        hobby.drop();
        InsertOneResult gaming = hobby.insertOne(new Document("name", "gaming"));
        InsertOneResult running = hobby.insertOne(new Document("name", "running"));

        MongoCollection<Document> person = db.getCollection("person");
        person.drop();
        person.insertMany(
                Arrays.asList(
                        new Document("name", "Max").append("age", 24).append("hobby", getRef(gaming)),
                        new Document("name", "Alex").append("age", 25).append("hobby", getRef(gaming)),
                        new Document("name", "Claire").append("age", 19).append("hobby", getRef(running)))
        );
    }