private function createEmbed(EmbeddedPropMetadata $embeddedPropMeta, Embed $embed)
    {
        $embedMeta = $embeddedPropMeta->embedMeta;

        $obj = [];
        foreach ($embedMeta->getAttributes() as $key => $attrMeta) {
            $value = $this->getAttributeDbValue($attrMeta, $embed->get($key));
            if (null === $value) {
                continue;
            }
            $obj[$key] = $value;
        }
        foreach ($embedMeta->getEmbeds() as $key => $propMeta) {
            $value = (true === $propMeta->isOne()) ? $this->getEmbedOneDbValue($propMeta, $embed->get($key)) : $this->getEmbedManyDbValue($propMeta, $embed->get($key));
            if (null === $value) {
                continue;
            }
            $obj[$key] = $value;
        }
        return $obj;
    }