We're still thoroughly in an ActiveRecord mindset over here. Before we go and 
build some simple collect statements to replace a few has_many :through 
statements, is there some Ripple or Riak goodness we should be using instead?

Example:

* A Publisher has many Authors who have many Books
* We want to get a set of books for a given publisher
* In ActiveRecord we would say:

# publisher.rb
class Publisher < ActiveRecord::Base
  has_many :authors
  has_many :books, :through => authors
end

# author.rb
class Author < ActiveRecord::Base
  belongs_to :publisher
  has_many :books
end

# book.rb
class Book < ActiveRecord::Base
  belongs_to :author
end

Thanks

M.


_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to