couchrest / couchrest_extended_document

Extends CouchRest with helpers and such
Apache License 2.0
24 stars 5 forks source link

Document uses extlib_inheritable_accessor, which dup's the database #8

Open tapajos opened 14 years ago

tapajos commented 14 years ago

Issue from: http://github.com/couchrest/couchrest/issues#issue/11

This seems like a bad idea. If I have several ExtendedDocuments, they all have references to separate CouchRest::Database instances. If I change one, it doesn't reflect across the others.

I'm trying to write an Sinatra app which scopes different clients to different databases. Since every subclass of CouchRest::ExtendedDocument comes with a separate copy of the database, it's impossible to change all of them at once.