Module: ROM::SQL::Plugin::Associates::InstanceMethods Private
- Defined in:
- lib/rom/sql/plugin/associates.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#SQL::Commands::Create ⇒ Array<Hash>, Hash
Set fk on tuples from parent tuple.
Instance Method Details
#SQL::Commands::Create ⇒ Array<Hash>, Hash
Set fk on tuples from parent tuple
25 26 27 28 29 30 31 32 33 |
# File 'lib/rom/sql/plugin/associates.rb', line 25 def execute(tuples, parent) fk, pk = association[:key] input_tuples = with_input_tuples(tuples).map { |tuple| tuple.merge(fk => parent.fetch(pk)) } super(input_tuples) end |