Upstream Patch: ORM enhancements for PTA
This commit is contained in:
parent
338be6719e
commit
214bc39648
@ -384,7 +384,7 @@ class Kohana_ORM extends Model implements serializable {
|
|||||||
|
|
||||||
foreach ($this->_has_many as $alias => $details)
|
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['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;
|
||||||
$defaults['through'] = NULL;
|
$defaults['through'] = NULL;
|
||||||
$defaults['far_key'] = Inflector::singular($alias).$this->_foreign_key_suffix;
|
$defaults['far_key'] = Inflector::singular($alias).$this->_foreign_key_suffix;
|
||||||
|
Reference in New Issue
Block a user