public function create(array $attributes)
{
$foreign = array($this->foreignKey => new MongoID($this->parent->getKey()));
// When saving a polymorphic relationship, we need to set not only the foreign
// key, but also the foreign key type, which is typically the class name of
// the parent model. This makes the polymorphic item unique in the table.
$foreign[$this->morphType] = $this->morphClass;
$attributes = array_merge($attributes, $foreign);
$instance = $this->related->newInstance($attributes);
$instance->save();
return $instance;
}