incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wordit Ltd <wordi...@googlemail.com>
Subject Re: Update handler doc ids
Date Fri, 12 Nov 2010 00:36:02 GMT
On Thu, Nov 11, 2010 at 11:45 PM, Zachary Zolton
<zachary.zolton@gmail.com> wrote:
>
>Yes, by all means, use their username in the doc ID. Then you
> wont need to do a query just to determine the ID.

Thanks, got it working. This is good stuff.

> If you're considering having other types of docs in the same DB,
> however, you'll probably wanna namespace the user doc IDs. For
> example, user "foobar" has a doc such as "user:foobar".

Hmm, I don't follow. I have a doc for user foobar with "_id:foobar".
If I had a second type of document, say one type with user's blog
posts and another with comments by same user, then do you mean I'd
need to add a field unique to usernames because the ID has already
been used?

Isn't the sticking point with update handlers that I have to know the
ID, so I could only use this method for one type of document, namely
those where doc ID is username?

Thanks,

Marcus

Mime
View raw message