[...] I don't like this flat collapsing. But on the other hand I feel like a category / taxonomy additional field would be too much.
You're confusing me, don't do that This is what we have as of today; all documents have a field "type" (with values such as "CouchDBEntity", "CouchDBAssociation") and for entities there is another field named "tableName" (with values such as "BlogPost"). If you dislike this approach and also the one which collapses both attributes into one field, what do you suggest then?
Really the more natural mapping is to have the association info in the entity document.
Agreed on that, the external collection strategy seems a bit dubious to me anyway, in particular due to the increased risk of inconsistencies. But note that even if we abandoned the external strategy altogether, the discussed issue would remain, as there is another document category for sequence values which need to be distinguished from entities.
|