public function copy( $deep = false )
    {
        $data = $this->data;
        foreach( static::$keyProperties as $key ) {
            $data[$key] = null;
        }

        foreach( $data as $key => $value ) {
            if( is_object( $value ) and !( $value instanceof self ) ) {
                $data[$key] = clone $value;
            }
        }

        // have repository?
        try {
            if( $repository = $this->r() ) {
                $entity = $repository->make( $data );
                return $entity;
            }
        } catch ( EntityMissingEntityManagerException $e ) {
        }

        $entity = clone $this;
        $entity->data = $data;

        return $entity;
    }