I'm upgrading from rails 3.2 to 4.0. I noticed there is a big change in the behavior when using ActiveRecord to associate an existing child model to a new Parent model. 

Consider de following:

```
class Parent
  has_many :kids
  accepts_nested_attributes_for :kids
end

class Kid
  belongs_to :parent
end

```

and the following context:

```
Kid {id: 1, name: 'kid1', parent_id: nil}
Kid {id: 2, name: 'kid2', parent_id: nil}

```

If I send this parameters to the controller:

```
"parent"=>{ "title"=>"mom", "kids_attributes"=>{ "1"=>{"id"=>"1", "name"=> "kiddo"}, "2"=>{"id"=>"2"} }

```

And do:

```
p = Parent.new(params[:parent])
p.save

```

With Rails 3.2 the result is:

```
Parent {id: 1, title: 'mom'}
Kid {id: 1, name: 'kiddo', parent_id: 1}
Kid {id: 2, name: 'kid2', parent_id: 1}

```

But, with Rails 4.0 (after converting to strong\_parameters) the call to `Parent.new` raises an error

```
Couldn't find Kid with ID=1 for Parent with ID=

```

[I read this thread](https://stackoverflow.com/questions/37355956/rails-nested-attributes-in-new-method-with-existing-record/37356422) 

It seems now I have to create the Parent first and then save the children.

This is a problem in the cases I may have existing and non existing children being submitted at the same time. I would have to manually check which children already exist (have and id), remove them from the parameters, save the parent, and then update their attributes ? 

Is this what I have to do in order to upgrade Rails or there is something else causing this different behavior ? 

In fact, when I do

```
@parent = Parent.new
@parent.kids.build(parent_parameters[:kids_attributes])

```

ActiveRecord do no lookups and the Kids remain with only the id set. In my context I cannot save any of the records yet.