Skip to content

Commit

Permalink
Update Direct.php (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored Oct 7, 2024
1 parent c881655 commit e2f9e71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mapping/DataTarget/Direct.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public function assignData(ElementInterface $element, $data): void
$setterParts = explode('.', $this->fieldName);

if ($this->fieldName === 'key') {
if (!$this->checkAssignData($data, $element, 'getKey')) {
return;
}
$this->doAssignData($element, $this->fieldName, $data);
} elseif (count($setterParts) === 1) {
//direct class attribute
Expand Down

0 comments on commit e2f9e71

Please sign in to comment.