I wonder how the couchdb people address the problem of document kind
From what I've seen one uses just a "normal" field name such as "type" or "documentType".
But as a first draft, $type and $table seems fine.
Ok.
We could make them properties for someone to override them.
The problem I have with this kind of setting which effect the persisted format is that we so far are not prepared for changes. Say a user has started with "type" and then after a while changes it to "documentType", then we'd be in trouble. I think many users would expect it to just work. Sure the user could update existing documents etc. but IMO it opens a level of complexity and need for explanations which I'd prefer to avoid for the time being.
BTW I don't like "CouchDBEntity", I'd rather use something neutral
Agreed, it seems redundant. I had already opened OGM-383 a while back to have these names changed. I first thought about short symbols but "entity" and "association" seem fine. I don't think "document" is good because everything is a document in CouchDB terms, i.e. also the associations and sequences.
|