laravel/laravel — pull request #1143 by franzliedke (2012-08-25 22:14:14+00:00)
Title: Fix insert() method for related models.

As described in [this forum topic](http://forums.laravel.com/viewtopic.php?id=2257), passing a model object to a relationship's `insert()` method caused problems, if custom attribute setters were specified.

The reason for this is that the model wasn't filled with the raw attribute data. Instead, every attribute's value was passed to the attribute's setter method (if it existed), causing e.g. duplicate hashing of passwords.

In fact, the copying of the attributes of the model object passed to `insert()` to an entirely new object is completely unnecessary. Instead, we can simply set the foreign key and then save the model directly.