Fixes error in parsing parameters passed to a model with associations

When trying to create a record of a model that has_many of another
model and passing the parameters of the second model record as a
hash, it used to raise an exception. This fixes that behaviour and
allows passing of a second model record parameters to the parameters
used to create the first model.

[Ahmed AbouElhamayed]