Skip to content

Commit

Permalink
entity: virtual properties are never stored in implicit entity data (…
Browse files Browse the repository at this point in the history
…BC break!)
  • Loading branch information
hrach committed Aug 27, 2017
1 parent 54b61f5 commit 987ca13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Entity/AbstractEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ private function setterPrimaryProxy($value, PropertyMetadata $metadata)
foreach ($keys as $key) {
$this->setRawValue($key, array_shift($value));
}
return IEntity::SKIP_SET_VALUE;
return null;
}


Expand Down Expand Up @@ -417,7 +417,7 @@ private function internalSetValue(PropertyMetadata $metadata, string $name, $val

if ($metadata->hasSetter) {
$value = call_user_func([$this, $metadata->hasSetter], $value, $metadata);
if ($value === IEntity::SKIP_SET_VALUE) {
if ($metadata->isVirtual) {
$this->modified[$name] = true;
return;
}
Expand Down
7 changes: 0 additions & 7 deletions src/Entity/IEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@

interface IEntity
{
/**
* @const
* Skips setting return value form setter.
*/
const SKIP_SET_VALUE = "\0";


public function getRepository(): IRepository;


Expand Down

0 comments on commit 987ca13

Please sign in to comment.