mongo data example :mongo data example :
    Document query1 = doc("project", "projectId")
            .append("student", "studentId")
            .append("target", new Document().append("id","001").append("name","subject"));
    Document query2 = doc("project", "projectId")
            .append("student", "studentId")
            .append("target", new Document().append("name","subject").append("id","001"));
    db.getCollection("collection").find(query1)  //result is not null
    db.getCollection("collection").find(query2)  //result is null
why?
