couchbase / couchbase-ruby-model

The Active Model implementation for Couchbase Server built on couchbase-ruby-client
61 stars 23 forks source link

Rails generator for model #16

Open ncavig opened 11 years ago

ncavig commented 11 years ago

Couchbase-model shouldn't assume all models will inherit from Couchbase::Model - it essentially breaks the active record model generation flow when the couchbase-model gem is present in the gemfile.

Example: My app connects to several datastores including mysql and couchbase so my use case is to have models that inherit from different parent base classes

pankajbatra commented 9 years ago

I also have same issue. Want to use mysql and couchbase in same app, but couchbase-model in gemfile does not allow a model generation.

avsej commented 9 years ago

You might keep your models in plain old ruby objects to express the business logic. And use couchbase and mysql only for persistence model. Yes it looks like limitation for now, but it will be definitely addressed in the future.

btw, this video from uncle bob is very nice: https://www.youtube.com/watch?v=WpkDN78P884