Skip to content

Commit

Permalink
Merge pull request #146 from thenotsoft/fix_embedded_relational_mapping
Browse files Browse the repository at this point in the history
fix embedded relation unmapped properties
  • Loading branch information
wolfy-j authored Dec 24, 2020
2 parents 60ae3bc + 39a3e31 commit 6b107e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Relation/Embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function queue(CC $store, $entity, Node $node, $related, $original): Comm
*/
protected function getChanges($related, State $state): array
{
$data = $this->mapper->extract($related);
$data = array_intersect_key($this->mapper->extract($related), $this->columns);

return array_udiff_assoc($data, $state->getData(), [static::class, 'compare']);
}
Expand Down
3 changes: 3 additions & 0 deletions tests/ORM/Fixtures/UserCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ class UserCredentials
{
public $username;
public $password;

public $unmapped_public_property;
private $unmapped_private_property;
}

0 comments on commit 6b107e1

Please sign in to comment.