Maps the entity instance to the property
of the read model.

@param string $propertyName

@return void
777453
public function entityTo(string $propertyName)
    {
        $idString = implode(':', [$this->definition->getClassName(), __CLASS__, $this->relationCount++]);
        $this->readDefinition->relation($propertyName)
            ->asCustom(new EmbeddedObjectRelation($idString, new EmbeddedMapperProxy($this->mapper)));
    }
813250
public static function initByOneToMany($model, $propertyName, $annotation)
    {
        $className = BeanFactory::getObjectClass($model);

        if(class_exists($annotation->model))
        {
            $modelClass = $annotation->model;
        }
        else
        {
            $modelClass = Imi::getClassNamespace($className) . '\\' . $annotation->model;
        }

        $struct = new OneToMany($className, $propertyName, $annotation);
        $leftField = $struct->getLeftField();
        $rightField = $struct->getRightField();

        $model->$propertyName = new ArrayList($modelClass);
        if(null !== $model->$leftField)
        {
            $list = $modelClass::query()->where($rightField, '=', $model->$leftField)->select()->getArray();
            if(null !== $list)
            {
                $model->$propertyName->append(...$list);
            }
        }

    }
393471
public function removeByName($propertyName)
    {
        $removedList = new self();
        $list = $this->getIterator();
        foreach ($list as $index => $property) {
            if ((is_array($propertyName) && in_array($property->getName(), $propertyName))
                || ($property->getName() === $propertyName)
            ) {
                $removedList->add(clone $property);
                $this->remove($index);
            }
        }

        return $removedList;
    }
1108221
public function setProperty(&$object, string $propertyName, $value)
    {
        $reflection = new ReflectionClass(get_class($object));

        /** @var ReflectionProperty $property */
        $property = $reflection->getProperty($propertyName);
        $property->setAccessible(true);

        $property->setValue($object, $value);
    }
1070989
public function markAsIdentityProperty($propertyName)
    {
        if (!array_key_exists($propertyName, $this->properties)) {
            throw new \InvalidArgumentException('Property "' . $propertyName . '" must be added to the class schema before it can be marked as identity property.', 1233775407);
        }
        if ($this->properties[$propertyName]['lazy'] === true) {
            throw new \InvalidArgumentException('Property "' . $propertyName . '" must not be makred for lazy loading to be marked as identity property.', 1239896904);
        }
        $this->identityProperties[$propertyName] = $this->properties[$propertyName]['type'];
    }
544450
protected function initPropertyArray( $propertyName, $propertyClass){
        if( property_exists( static::class, $propertyName) && is_array( $this->$propertyName)){
            $newProperty = [];
            foreach( $this->$propertyName as $PropertyItem){
                if( is_array( $PropertyItem)){
                    $newProperty[] = new $propertyClass( $PropertyItem);
                }
            }
            $this->$propertyName = $newProperty;
        }
    }
6917
public function removeAllProperties($propertyName, $value = null)
    {
        $updateable = Updatable::getInstance()
            ->table($this->getUserPropertiesDefinition()->table())
            ->where("{$this->getUserPropertiesDefinition()->getName()} = :name", ["name" => $propertyName]);

        if (!empty($value)) {
            $updateable->where("{$this->getUserPropertiesDefinition()->getValue()} = :value", ["value" => $value]);
        }

        $this->propertiesRepository->deleteByQuery($updateable);

        return true;
    }
1206117
private function setDataForSubEntitiy($propertyKey, $value)
    {
        $subKey = strtolower(strstr($propertyKey, '_', true));
        $getterMethodName = 'get' . ucfirst($subKey);

        if (!empty($subKey) && method_exists($this, $getterMethodName)) {
            $subObject = $this->$getterMethodName();

            // If we managed to get sub object, set his data
            if ($subObject instanceof EntityAbstract) {
                $subObject->setDataFromArray(
                    array($propertyKey => $value)
                );
            }
        }
    }
362451
private function existingPropertyGetterAvailableOrFail(string $propertyName): void
    {
        assert($this->propertyExists($propertyName));
        if (!$this->isExistingPropertyGetterAvailable($propertyName)) {
            throw new UnavailableOperationException($propertyName);
        }
    }
1113834
final static public function getMappedField($propertyName) {
		
		$binds = static::getBinds();
		return isset($binds[$propertyName]) ? $binds[$propertyName] : NULL;
		
	}
919312
public function loadProperty($object, $propertyName)
    {
        if (get_class($object) !== $this->objectClass) {
            throw new \LogicException(sprintf('Invalid object type. Expected "%s" but got "%s".', $this->objectClass, get_class($object)));
        }

        if ($this->objectManager->isPropertyLoaded($object, $propertyName)) {
            return;
        }

        $hydrator = $this->objectManager->getHydratorFor($this->objectClass);
        $hydrator->loadProperty($object, $propertyName);
    }
1351298
public function hasChangeFor($propertyName)
    {
        foreach ($this->getIterator() as $change) {
            /* @var ScalarChange $change */
            if ($change->isFor($propertyName)) {
                return true;
            }
        }

        return false;
    }
649641
private function attachChangeListenerToModelProperty($propertyName, ModelState $item)
    {
        $item->clearEventHandlers();
        $item->attachEventHandler("AfterChange", function () use ($propertyName, $item) {
            $this->raisePropertyChangedCallbacks($propertyName, $item, null);
        });
    }
245420
public static function collect(string $className, $objectAnnotation = null, string $propertyName = '', string $methodName = '', $propertyValue = null)
    {
        if ($objectAnnotation instanceof Connection) {
            $type   = $objectAnnotation->getType();
            $driver = $objectAnnotation->getDriver();
            self::$connects[$driver][$type] = $className;
        }
    }
712363
public function setPropertyClassName($propertyClassName)
    {
        $event = new SetPropertyClassNameEvent($propertyClassName, $this);
        $this->dispatchEvent($event);
        $propertyClassName = $event->getPropertyClassName();

        $this->propertyClassName = (string) $propertyClassName;
        $this->propertyClass     = new \ReflectionClass($this->propertyClassName);
        return $this;
    }
513929
private function isExistingPropertySetterAvailable(string $propertyName): bool
    {
        assert($this->propertyExists($propertyName));
        if ($this->isExistingPropertyVirtual($propertyName)) {
            return !is_null($this->virtualSetters[$propertyName]);
        } else {
            return $this->realSetAvailable[$propertyName];
        }
    }
91757
public function setProperty($propertyName, $propertyValue)
    {
        if ($propertyName == '')
            throw new Exception('Property Name not specified');

        if ($propertyValue == '')
            throw new Exception('Property Value not specified');

        //build URI 
        $strURI = Product::$baseProductUri . '/email/' . $this->getFileName() . '/properties/' . $propertyName;

        $put_data_arr['Value'] = $propertyValue;

        $put_data = json_encode($put_data_arr);

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'PUT', 'json', $put_data);

        $json = json_decode($responseStream);

        if ($json->Code == 200)
            return $json->EmailProperty->Value;
        else
            return false;
    }