We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It cannot change $primary_key of entity. After save is still in database original value.
$ended_uniq_customer_actions = \Db\ActionsToCustomersUniq::find('all', array( 'conditions' => array( 'customers_uniq_id = ?', 16728 ) ));
$ended_uniq_customer_actions[0]->customers_uniq_id = 15892; $ended_uniq_customer_actions[0]->save();
class ActionsToCustomersUniq extends ActiveRecord\Model { static $table_name = 'crm_actions_to_customers_uniq'; static $primary_key = array('actions_id','customers_uniq_id'); }
CREATE TABLE IF NOT EXISTS crm_actions_to_customers_uniq ( actions_id int(11) NOT NULL DEFAULT '0', updated_at datetime DEFAULT NULL, created_at datetime DEFAULT NULL, customers_uniq_id int(11) NOT NULL DEFAULT '0', PRIMARY KEY (customers_uniq_id,actions_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -----------------------------+ | actions_id | customers_uniq_id | -----------------------------+ | 3 | 16728 | -----------------------------+
crm_actions_to_customers_uniq
actions_id
updated_at
created_at
customers_uniq_id
mysql Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3
Thank You in advance for help
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It cannot change $primary_key of entity.
After save is still in database original value.
$ended_uniq_customer_actions = \Db\ActionsToCustomersUniq::find('all', array(
'conditions' => array(
'customers_uniq_id = ?',
16728
)
));
$ended_uniq_customer_actions[0]->customers_uniq_id = 15892;
$ended_uniq_customer_actions[0]->save();
class ActionsToCustomersUniq extends ActiveRecord\Model {
static $table_name = 'crm_actions_to_customers_uniq';
static $primary_key = array('actions_id','customers_uniq_id');
}
CREATE TABLE IF NOT EXISTS
crm_actions_to_customers_uniq
(actions_id
int(11) NOT NULL DEFAULT '0',updated_at
datetime DEFAULT NULL,created_at
datetime DEFAULT NULL,customers_uniq_id
int(11) NOT NULL DEFAULT '0',PRIMARY KEY (
customers_uniq_id
,actions_id
)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-----------------------------+ | actions_id | customers_uniq_id |
-----------------------------+ | 3 | 16728 |
-----------------------------+
mysql Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3
Thank You in advance for help
The text was updated successfully, but these errors were encountered: