diff --git a/includes/kohana/modules/orm/classes/kohana/orm.php b/includes/kohana/modules/orm/classes/kohana/orm.php index be9a2e8..b5ef1e2 100644 --- a/includes/kohana/modules/orm/classes/kohana/orm.php +++ b/includes/kohana/modules/orm/classes/kohana/orm.php @@ -384,7 +384,7 @@ class Kohana_ORM extends Model implements serializable { foreach ($this->_has_many as $alias => $details) { - $defaults['model'] = Inflector::singular($alias); + $defaults['model'] = $this->_model_names_plural ? Inflector::singular($alias) : $alias; $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix; $defaults['through'] = NULL; $defaults['far_key'] = Inflector::singular($alias).$this->_foreign_key_suffix;