diff --git a/src/Resolver.php b/src/Resolver.php index 17c492a..ac0fef7 100644 --- a/src/Resolver.php +++ b/src/Resolver.php @@ -208,7 +208,13 @@ public function getAlias(Model $model): string )); } - return $this->aliasPrefix . $this->aliases[$model]; + $alias = ($this->aliasPrefix ?? '') . $this->aliases[$model]; + + if (strlen($alias) > 63) { + $alias = $this->query->getDb()->getAdapter()->quoteIdentifier('x' . hash('xxh3', $alias)); + } + + return $alias; } /**