| Class | DataMapper::Associations::ManyToOne::Relationship |
| In: |
lib/dm-core/associations/many_to_one.rb
|
| Parent: | Associations::Relationship |
Relationship class with implementation specific to n side of 1 to n association
| OPTIONS | = | superclass::OPTIONS.dup << :required << :key << :unique |
| child_repository_name | -> | source_repository_name |
| @api semipublic | ||
| child_model | -> | source_model |
| @api semipublic | ||
| parent_repository_name | -> | target_repository_name |
| @api semipublic | ||
| parent_model | -> | target_model |
| @api semipublic | ||
| parent_key | -> | target_key |
| @api semipublic | ||
Returns a set of keys that identify source model
@return [DataMapper::PropertySet] a set of properties that identify source model @api private
Initialize the foreign key property this "many to one" relationship uses to persist itself
@api public
Loads and returns association target (ex.: author) for given source resource (ex.: article)
@param source [DataMapper::Resource]
source object (ex.: instance of article)
@param other_query [DataMapper::Query]
Query options
@api semipublic
Loads association target and sets resulting value on given source resource
@param [Resource] source
the source resource for the association
@return [undefined]
@api private
Sets value of association target (ex.: author) for given source resource (ex.: article)
@param source [DataMapper::Resource]
source object (ex.: instance of article)
@param target [DataMapper::Resource]
target object (ex.: instance of author)
@api semipublic