public function write($instance, $entity = null)
    {
        list($instance, $entity) = $this->reassignEntity($instance, $entity);

        return new WriteQuery(
            $this->connection,
            $instance,
            $this->models->get($entity),
            $this->factory,
            $this->accessor,
            $this->dispatcher
        );
    }
public function write($instance, $entity = null)
    {
        list($instance, $entity) = $this->reassignEntity($instance, $entity);

        return new WriteQuery(
            $this->connection,
            $instance,
            $this->models->get($entity),
            $this->factory,
            $this->accessor,
            $this->dispatcher
        );
    }
public function write ( $ instance , $ entity = null ) { list ( $ instance , $ entity ) = $ this -> reassignEntity ( $ instance , $ entity ) ; return new WriteQuery ( $ this -> connection , $ instance , $ this -> models -> get ( $ entity ) , $ this -> factory , $ this -> accessor , $ this -> dispatcher ) ; }
Sets write operation

@param array|object       $instance
@param null|string|object $entity

@return WriteQueryInterface
Sets write operation