[Cakephp 2.5.4]
I would like to insert a new entry into a table with only one primary auto-increment key.
I have 2 tables :
mytables (id[A_I],name,sequence_id)
sequences (id[A_I])
I trying to insert data into a transaction using "saveAssociated" function:
$data = array(
'MyTable' => array(
'name' => 'test'
),
'Sequence' => array()
);
Then
$this->MyTable->saveAssociated($data);
Associations between MyTable and Sequence are well defined into each Model. By the way the transaction always rollback.
If I add a new field into sequences table it works..
- How can I succeed this transaction keeping an unique field into
sequencestable