First, it is a convention that if you are saving fields mapped to the same model and want multiple db inserts that the data array should be formatted as Mike expressed above:
i.e. Model.{n}.field
You can clearly see that they explicitly say that when you are saving the same fieldname in the same model multiple times that this is the convention as the title of the manual section is name "Field Naming Conventions"
http://book.cakephp.org/view/1390/Automagic-Form-Elements#Field-naming-convention-1391
You can't really call the input problem a CakePHP bug if the input method wasn't written to accommodate you using the method in an unintended fashion. The method explicitly splits the passed string on the "." character and assumes that if you are using a string with the "." character that you are intending to format your data array for saving using either Model->save or Model->saveAll
Secondly, when I test your code at my end it does exhibit a legit bug - it uses the numeric indexes I expect but duplicates them..
i.e. [0][0][Descriptor][title], 1[Descriptor][title]
When I move the index to where the save* functions expect it to be, the parsing is perfect.
i.e. [Descriptor][0][title], Descriptor[title]
So, if you want to use the helpers you should be using them in the ways they are intended to work. It isn't a bug if you invent your own edge case that wasn't intended to be supported by the helper to begin with.
Judging from your example - there is no reason not to use saveAll anyways. Do you have some reason for avoiding it; It seems to be the right way to do what you are asking.
** EDITED TO FIX TICKET http://cakephp.lighthouseapp.com/projects/42648/tickets/867 **
App this as app/views/app_view.php
<?php
App::import('View', 'View', false);
class AppView extends View {
/**
* Constructor
*
* @param object $controller
*/
function __construct(&$controller){
parent::__construct($controller);
}
/**
* Temporary View::entity fix for 1.2.5
* Returns the entity reference of the current context as an array of identity parts
*
* @return array An array containing the identity elements of an entity
* @access public
*/
function entity() {
$assoc = ($this->association) ? $this->association : $this->model;
if (!empty($this->entityPath)) {
$path = explode('.', $this->entityPath);
$count = count($path);
if (
($count == 1 && !empty($this->association)) ||
($count == 1 && $this->model != $this->entityPath) ||
($count == 2 && !empty($this->fieldSuffix)) ||
is_numeric($path[0]) && !empty($assoc)
) {
array_unshift($path, $assoc);
}
return Set::filter($path);
}
return array_values(Set::filter(
array($assoc, $this->modelId, $this->field, $this->fieldSuffix)
));
}
}
?>
Tell your controller to use the view with it's public $view property.
<?php
class FooController extends Controller {
...
...
var $view = 'App';
...
...
}
?>