On Thu, Aug 18, 2011 at 1:47 PM, Simon Leblanc <[email protected]> wrote: > I see 3 options: > use different databases for users and stuffs, but that means two design > documents and it kind of defeats the purpose of couchapps > use uuids and deal with names in a custom manner. Sounds difficult. I would > really prefer the third option: > use a naming convention for ids, like user:bob and stuff:somestuff.
I have option #4 for you: instead of using a show function, use a list. You still use UUIDs for the ID, and you just have a view that emits all "users" keyed on the unique username. Since that username is (theoretically) unique, your list function can be designed to just show one user ever, and then you rewrite to it. Maybe.
