有教程
http://code.google.com/docreader/#p=morphia&s=morphia&t=QuickStart
但它忽略了如何获取酒店 ID 的细节。
Morphia morphia = ...;
Datastore ds = morphia.createDatastore("testDB");
String hotelId = ...; // the ID of the hotel we want to load
// and then map it to our Hotel object
Hotel hotel = ds.get(Hotel.class, hotelId);
我认为它要么是 mongo 的 java 驱动程序,要么是 morphia API。那么如何获取id呢?