Skip to content

Commit a8e4999

Browse files
authored
Merge pull request #292 from frandss/improve-find-slugged
Add alias to field identifier in find slugged
2 parents f571343 + 6a50d37 commit a8e4999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/Behavior/SluggedBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function initialize(array $config): void {
176176
* @return \Cake\ORM\Query\SelectQuery
177177
*/
178178
public function findSlugged(SelectQuery $query, string $slug): SelectQuery {
179-
return $query->where([$this->_config['field'] => $slug]);
179+
return $query->where([$this->_table->aliasField($this->_config['field']) => $slug]);
180180
}
181181

182182
/**

0 commit comments

Comments
 (0)