Closed applyACS closed 11 months ago
version 11.12
translation relation does not work with uuid keys because of max
```
public function translation(): HasOne { return $this ->hasOne($this->getTranslationModelName(), $this->getTranslationRelationKey()) ->ofMany([ $this->getTranslationRelationKey() => 'max', ], function (Builder $query): void { $query->where($this->getLocaleKey(), $this->localeOrFallback()); }); }
uuid is not sortable in postgresql Can you maybe rollback to the previous code?
public function translation(): HasOne { return $this ->hasOne($this->getTranslationModelName(), $this->getTranslationRelationKey()) ->where($this->getLocaleKey(), $this->localeOrFallback()); }
This worked just fine
version 11.12
translation relation does not work with uuid keys because of max
public function translation(): HasOne { return $this ->hasOne($this->getTranslationModelName(), $this->getTranslationRelationKey()) ->ofMany([ $this->getTranslationRelationKey() => 'max', ], function (Builder $query): void { $query->where($this->getLocaleKey(), $this->localeOrFallback()); }); }
public function translation(): HasOne { return $this ->hasOne($this->getTranslationModelName(), $this->getTranslationRelationKey()) ->where($this->getLocaleKey(), $this->localeOrFallback()); }