-
Type:
Improvement
-
Resolution: Done
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: Documentation
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Hey everyone,
I was going through the POJO doc (http://mongodb.github.io/mongo-java-driver/3.10/driver/getting-started/quick-start-pojo/) of JAVA driver 3.10 when I found out that the example on the page does not work.
For example:
CodecRegistry pojoCodecRegistry = fromRegistries(MongoClient.getDefaultCodecRegistry(),
fromProviders(PojoCodecProvider.builder().automatic(true).build()));
won't work, because the MongoClient class has been refactored and it doesn't have that method. MongoClientSettings should be used.
By checking out https://github.com/mongodb/mongo-java-driver/blob/master/driver-sync/src/examples/tour/PojoQuickTour.java , that code works well and up-to-date.
I think the previous docs (e.g. 3.9 ) have the same example codes, so they might won't work as well.