When I say "embedded associations", I mean the association's target class is an EmbeddedDocument. I know for certain that Adam Hunter, who did most of the work for those, is using them in his application.
At this point I don't have an estimate for when it will be ready to use, but given the upcoming holiday weekend, I plan to carve out some time to update the library. In the meantime, yes you could use links on the underlying RObject, but it'll be a little bit fiddly. Sean Cribbs <[email protected]> Developer Advocate Basho Technologies, Inc. http://basho.com/ On May 28, 2010, at 5:07 PM, francisco treacy wrote: > Thanks for the prompt reply, Sean. > > What do you mean by "embedded associations"? How do you create those? > For the moment I'll work with with "property :items, Array, :default => [] ". > > As links are quite essential to work with Riak, do you have an > estimation when this functionality will be ready for use? > > Maybe a workaround is using links in the underlying RObject, although > it's a Document protected instance method. > > Francisco > > > 2010/5/28 Sean Cribbs <[email protected]>: >> Francisco, >> >> I'm sorry this didn't make it around to you yet (I think it was in the recap >> a few days ago). The associations feature is incomplete and thus only >> embedded associations work. I might change it to raise a >> NotImplementedError until they are. >> >> Sean Cribbs <[email protected]> >> Developer Advocate >> Basho Technologies, Inc. >> http://basho.com/ >> >> On May 28, 2010, at 4:09 PM, francisco treacy wrote: >> >>> I am having an issue with Ripple: >>> >>> $ rails c >>> ruby-1.9.1-p378 > user = User.find('[email protected]') >>> [...] >>> ruby-1.9.1-p378 > user.books >>> NameError: uninitialized constant >>> Ripple::Document::Associations::ManyLinkProxy >>> from >>> /Users/ftreacy/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta3/lib/active_support/inflector/methods.rb:114:in >>> `block in constantize' >>> from >>> /Users/ftreacy/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta3/lib/active_support/inflector/methods.rb:113:in >>> `each' >>> >>> when accessing a one-to-many association. >>> >>> Am I doing something wrong or it looks like a bug? >>> >>> This is the class: >>> >>> class User >>> include Ripple::Document >>> >>> property :name, String >>> property :email, String, :presence => true >>> property :password, String >>> property :password_confirmation, String >>> property :confirmation_sent_at, Time >>> >>> many :books >>> >>> timestamps! >>> >>> def key >>> email >>> end >>> >>> def id >>> email >>> end >>> >>> end >>> >>> Using: >>> gem 'rails', '3.0.0.beta3' >>> gem "ripple", "0.7.0" >>> >>> Thanks, >>> Francisco >>> >>> _______________________________________________ >>> riak-users mailing list >>> [email protected] >>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> >> _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
