If it's so common for your project, use Scala language:
trait EasyOid { self: MongoObject =>
def oid = mongoOID.get
}
and mix it into your classes, e.g.
class User extends MongoObject with EasyOid
That's it.
Regards,
Alexander
19.03.2011 at 16:09, Freewind wrote