module Tenacity::OrmExt::CouchRest

Tenacity relationships on CouchRest objects require no special keys defined on the object. Tenacity will define the keys that it needs to support the relationships. Take the following class for example:

class Car < CouchRest::ExtendedDocument
  include Tenacity

  t_has_many    :wheels
  t_has_one     :dashboard
  t_belongs_to  :driver
end

t_belongs_to

The t_belongs_to association will define a property named after the association. The example above will create a property named :driver_id

t_has_one

The t_has_one association will not define any new properties on the object, since the associated object holds the foreign key.

t_has_many

The t_has_many association will define a property named after the association. The example above will create a property named :wheels_ids