Closed danielml01 closed 8 months ago
Thanks for the info!
Feel free to open a PR with the proposed change and I can take a look later today - if not, I will likely have time to reproduce/address in the later half of next week.
Carved out some time for this today and released as part of 2.1.2
@JohnathonKoster I was using a patch file to make things work with the eloquent driver
--- /dev/null
+++ ../src/Processors/RelationshipProcessor.php
@@ -183,7 +183,8 @@
$updated = [];
if ($this->pristineEntry != null && $this->isNewEntry == false) {
- $pristine = $this->getFieldValue($fieldName, $this->pristineEntry, []);
+ //$pristine = $this->getFieldValue($fieldName, $this->pristineEntry, []);
+ $pristine = $this->pristineEntry->model()[$fieldName];
}
if ($this->isDelete) {
I don't think I need this anymore right?
Error: in_array(): Argument #2 ($haystack) must be of type array, string given at vendor/stillat/relationships/src/Processors/RelationshipProcessor.php:409
This is because if users are in a database (as opposed to flat files), the relationship field is stored as a string that looks like ["slug", "slug2", "slug3"]
Can be resolved before line 409 with something like: