lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 90 forks source link

unclear relation naming #20

Closed rhertogh closed 9 years ago

rhertogh commented 9 years ago

The relations between the ActiveRecords have unclear names E.g.

//LanguageTranslate.php

public function getId0() {
    return $this->hasOne(LanguageSource::className(), ['id' => 'id']);
}
public function getLanguage0() {
    return $this->hasOne(Language::className(), ['language_id' => 'language']);
}

I would expect:

public function getLanguageSource() {
    ...
}
public function getLanguage() {
   ...
}

Is this done with a specific reason?

lajax commented 9 years ago

The function cannot be called getLanguage due to a name conflict.

Thanks for the comment.