#6468: Import Fixtures don't use Model's table for HABTM models
---+
Reporter: arialdomartini | Type: Bug
Status: new | Priority: Low
Milestone: 1.2.x.x | Component: Test Suite
Version: 1.2 Final | Severity: Normal
Keywords: | Php_version: n/a
Cake_version: |
---+
When a fixture imports from a Model and var $table is not defined, the
table name is calculated using Inflector::underscore().[[BR]][[BR]]
Hence, table name specified in the Model is ignored.[[BR]][[BR]]
In cake_test_fixture.php, in the function init() it may make sense to
replace:[[BR]]
{{{
if (!isset($this-table)) {
$this-table =
Inflector::underscore(Inflector::pluralize($this-name));
}
}}}
with
{{{
if (isset($model-table)) {
$this-table = $model-table;
}
else if (!isset($this-table)) {
$this-table =
Inflector::underscore(Inflector::pluralize($this-name));
}
}}}
--
Ticket URL: https://trac.cakephp.org/ticket/6468
CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
tickets cakephp group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---