Hard task you're working on there ;) I have also think about automatically created views when building the datasource. That was for filtering document type too, if I remember well.
Imho, the main point here is that couchDB documents can have so many shapes and format, that doing a strong ORM over it leads to use schema and "standard" format in documents, which may be painful :p Please, let us know how and if there is a way to follow how it's going on. New ideas or help can be found that way. Cheers -- Clément On 13 juil, 11:55, Thomas Ploch <profipl...@googlemail.com> wrote: > As an addition to my last post, here is what I am currently doing: > > - Develop a special CouchDB Model that application models will extend > - Add a required docType field to the Models (might be defaulting to > Model::$alias) to check for in automatically created views. > - In the CouchDB Model constructor, analyze the associations and build > views depending on those values (if debug > 0, the views will be staled > immediately) as well as basic views that just emit the docType of the > Model it is calling. > - Override Model::find() in the CouchDB Model to process relations found > by the specifically created relational views. > - Implement listSources() to look for the Model views that describe the > Model. I.e. you have the Models Apple and Banana, the views 'apples' and > 'bananas' would be regarded as sources, while relational views would > start with an underscore '_apples_relations' would be disregarded in > listSources() > > This would result in an implementation, which will not only fetch > relations in one query to a view (or 2, depending on the final > implementation), but also everything will be handled in one database. > > I am currently developing this, but this is shitloads of work, and it > will still take me some time :) > > Kind regards > Thomas > > Am Mittwoch, den 13.07.2011, 02:10 -0700 schrieb Clément Hallet: > > > > > > > > > Hello to cakePHP > > > I created a CouhDB datasource at my company, and we released it as > > open source. > > It handles CRUD methods on a document, and can query the CouchDB > > views. > > > Code and documentation are available here > > :https://github.com/PathMotion/cakephp-couchsource > > > If you're interested in review, comment or bug-report it, please feel > > free. > > > -- > > Clément -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php