fixed bson/ObjectId

This commit is contained in:
Xing Xing 2013-08-07 15:30:41 +08:00
parent e7d32edee0
commit 2002bb1804

View File

@ -11,16 +11,14 @@ type IdGenerator interface {
}
// ObjectId
type objectId struct {
bson.ObjectId
}
type objectId struct {}
func (id *objectId) Id() string {
return id.Hex()
return bson.NewObjectId().Hex()
}
func NewObjectId() IdGenerator {
return &objectId{bson.NewObjectId()}
return &objectId{}
}
// AutoIncId