just a quick question: is it necessary to create a uniqid for your
records? YMDBS automatically sets the _id variable with a new MongoId,
that is designed to be unique among different servers too. So in most
cases you can depend on that variable. Becouse in Mongo you _must_
have an _id field, so in your example you'll have two identifiers (_id
and id) for every document.
--
Nagy Attila Gabor
ok, it's your choice. But Mongo let's you use other types than MongoId
for primary key also, so you could just override the beforeSave, to
generate the id's you like.
--
Nagy Attila Gabor