File tree Expand file tree Collapse file tree
src/test/com/mongodb/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,9 +14,21 @@ public static void main(String[] args)
1414
1515 Mongo m = new Mongo ( new DBAddress ( "127.0.0.1:27017/driver_test_framework" ) );
1616 DBObject foo = new BasicDBObject ();
17- m .getCollection ( "remove1" ).remove ( foo );
17+ DBCollection b = m .getCollection ( "b" );
18+ foo .put ( "c" , b );
19+ m .getCollection ( "a" ).save ( foo );
20+
21+ foo = new BasicDBObject ();
22+ foo .put ( "c" , 1 );
23+ b .save ( foo );
24+
25+ ObjectId id = new ObjectId ();
26+ foo = new BasicDBObject ();
27+ foo .put ( "_id" , id );
28+ foo .put ( "that" , 2 );
29+ DBRef ref = new DBRef ( "c" , id );
30+ foo .put ( "thiz" , ref );
31+ m .getCollection ( "c" ).save ( foo );
1832
19- foo .put ( "a" , 3 );
20- m .getCollection ( "remove1" ).remove ( foo );
2133 }
2234}
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ elif [[ "$1" = "remove" ]]; then
1212 java com.mongodb.framework.Remove
1313elif [[ " $1 " = " capped" ]]; then
1414 java com.mongodb.framework.Capped
15- elif [[ " $1 " = " circular" ]]; then
16- java com.mongodb.framework.Circular
15+ # elif [[ "$1" = "circular" ]]; then
16+ # java com.mongodb.framework.Circular
1717elif [[ " $1 " = " dbs" ]]; then
1818 java com.mongodb.framework.Dbs > $2
1919# elif [[ "$1" = "admin" ]]; then
You can’t perform that action at this time.
0 commit comments