diff --git a/Model/Item.php b/Model/Item.php index c720384..3c7b3ef 100644 --- a/Model/Item.php +++ b/Model/Item.php @@ -671,7 +671,10 @@ public static function createFromArray(array $array): self */ public static function getPathByField(string $field) { - if (0 === strpos($field, 'indexed_metadata.')) { + if ( + 0 === strpos($field, 'indexed_metadata.') || + 0 === strpos($field, '_user') + ) { return $field; } diff --git a/Tests/Model/ItemTest.php b/Tests/Model/ItemTest.php index 9d1d111..66e32bd 100644 --- a/Tests/Model/ItemTest.php +++ b/Tests/Model/ItemTest.php @@ -545,5 +545,6 @@ public function testPathByField() $this->assertEquals('indexed_metadata.another_id', Item::getPathByField('another_id')); $this->assertEquals('indexed_metadata._field', Item::getPathByField('_field')); $this->assertEquals('indexed_metadata._field', Item::getPathByField('indexed_metadata._field')); + $this->assertEquals('_user.lol', Item::getPathByField('_user.lol')); } }