lib/hanami/model/associations/has_many.rb in hanami-model-1.1.0 vs lib/hanami/model/associations/has_many.rb in hanami-model-1.2.0.beta1
- old
+ new
@@ -47,11 +47,11 @@
end
# @since 0.7.0
# @api private
def create(data)
- entity.new(command(:create, aggregate(target), use: [:timestamps])
+ entity.new(command(:create, aggregate(target), mapper: nil, use: [:timestamps])
.call(serialize(data)))
rescue => e
raise Hanami::Model::Error.for(e)
end
@@ -111,10 +111,10 @@
private
# @since 0.7.0
# @api private
def command(target, relation, options = {})
- repository.command(target, relation, options)
+ repository.command(target => relation, **options)
end
# @since 0.7.0
# @api private
def entity