Skip to content

Commit cdfd2af

Browse files
committed
changed to raw attributes to prevent mutators from being fired when loading data from FileMaker into a model
1 parent 9c7fae8 commit cdfd2af

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Database/Eloquent/FMModel.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,9 @@ public static function createFromRecord($record)
130130
})->toArray();
131131
}
132132

133-
// fill in the field data we've mapped and retrieved
134-
$instance->forceFill($fieldData);
135-
136-
// fill in the portal data we've mapped and retrieved
137-
$instance->forceFill($portalData);
133+
// fill in the field data and portal data we've mapped and retrieved
134+
$combinedAttributes = [...$fieldData, ...$portalData];
135+
$instance->setRawAttributes($combinedAttributes, true);
138136

139137
$recordId = $record['recordId'];
140138
$modId = $record['modId'];

0 commit comments

Comments
 (0)