doctrine / couchdb-odm

A Document Mapper based on CouchDB
http://www.doctrine-project.org
MIT License
150 stars 53 forks source link

Why rely on a doctrine_metadata key in the Document? #105

Closed wadmiraal closed 9 years ago

wadmiraal commented 9 years ago

I'm puzzled by the requirement for a doctrine_metadata key inside the CouchDB Document for the views to work.

I understand it being necessary for using associations. But what is the indexed key for, and why do the views not simply return a list of documents, regardless of them being "indexed" (whatever that means in this context) or not.

Why can't we just use the _design/doctrine_repositories/views/equal_constraint (or type_constraint) to do our basic querying? I'm not in favor of having vendor specific data inside my documents unless this is really helpful (as with the associations). If I have to migrate all my data simply to put doctrine_metadata.indexed: true in order to see it, it's a bit disappointing (unless, again, there's some clear logic I'm just not seeing yet).

wadmiraal commented 9 years ago

Ok, I wasn't really up to date with CouchDB, and I get it now. You were totally right in making that design call. So cool :-).