Module: Vorpal::Config::RemoteEndConfig
- Included in:
- HasManyConfig, HasOneConfig
- Defined in:
- lib/vorpal/config/configs.rb
Overview
Object association terminology:
-
All object associations are uni-directional
-
The end that holds the association is the ‘Owner’ and the end that is referred to is the ‘Associate’ or ‘Associates’
Relational association terminology:
-
Local end: has FK
-
Remote end: has no FK
Instance Method Summary collapse
- #associated_class_config ⇒ Object
- #foreign_key_info ⇒ Object
- #get_unique_key_value(db_owner) ⇒ Object
- #set_class_config(class_config) ⇒ Object
- #set_foreign_key(db_associate, owner) ⇒ Object
Instance Method Details
#associated_class_config ⇒ Object
18 19 20 |
# File 'lib/vorpal/config/configs.rb', line 18 def associated_class_config association_config.local_class_config end |
#foreign_key_info ⇒ Object
30 31 32 |
# File 'lib/vorpal/config/configs.rb', line 30 def foreign_key_info association_config.foreign_key_info(@class_config) end |
#get_unique_key_value(db_owner) ⇒ Object
34 35 36 |
# File 'lib/vorpal/config/configs.rb', line 34 def get_unique_key_value(db_owner) db_owner.send(unique_key_name) end |
#set_class_config(class_config) ⇒ Object
26 27 28 |
# File 'lib/vorpal/config/configs.rb', line 26 def set_class_config(class_config) @class_config = class_config end |
#set_foreign_key(db_associate, owner) ⇒ Object
22 23 24 |
# File 'lib/vorpal/config/configs.rb', line 22 def set_foreign_key(db_associate, owner) association_config.set_foreign_key(db_associate, owner) end |