Issue 38 in activecouch: [PATCH] Should include a default key for migration views

0 views
Skip to first unread message

codesite...@google.com

unread,
May 21, 2008, 1:26:01 PM5/21/08
to activ...@googlegroups.com
Issue 38: [PATCH] Should include a default key for migration views
http://code.google.com/p/activecouch/issues/detail?id=38

New issue report by tieg.zaharia:
What steps will reproduce the problem?
1. Create a migration without the "with_key" method
2. Run the migration
3. Test the view

What is the expected output? What do you see instead?
The view should return with the _id of documents as the key, but an
error is generated because
the key was generated in JS as "doc.", so CouchDB errs out.

What version of the product are you using? On what operating system?
couchdb - Apache CouchDB 0.7.3a656755
ActiveCouch Master tree (last commit d23dc3f648a4f89ed35aaf2aab76c2de3ecae44f)

Please provide any additional information below.
This was just a thought. If you're modeling this after
ActiveRecord/ActiveResource, those
libraries don't require a default key, table name, etc. You just
inherit from ActiveRecord::Base
and you're good. Specifically, migrations can be run with no data, so
perhaps ActiveCouch should
default to "_id" as a view key (or null if you think that's more
appropriate?). Spec and fix included
in patch.


Attachments:
activecouch_default_key_patch.diff 2.1 KB


Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
May 21, 2008, 2:28:01 PM5/21/08
to activ...@googlegroups.com
Issue 38: [PATCH] Should include a default key for migration views
http://code.google.com/p/activecouch/issues/detail?id=38

Comment #1 by tieg.zaharia:
Woops, forgot to account for symbols passed to with_key(). Patch modified.

Attachments:
activecouch_default_key_patch.diff 2.5 KB

codesite...@google.com

unread,
May 21, 2008, 2:41:03 PM5/21/08
to activ...@googlegroups.com
Issue 38: [PATCH] Should include a default key for migration views
http://code.google.com/p/activecouch/issues/detail?id=38

Comment #2 by tieg.zaharia:
Okay, here we go again.. found the with_key_spec.rb and moved the tests
there. This is now the latest patch for
the ticket.

Attachments:
activecouch_default_key_patch.diff 2.4 KB

Reply all
Reply to author
Forward
0 new messages