Cannot save data in DB

I have a table with many-to-many relationships. I want to save the data in an intermediate table, but nothing happens.

it`s my controller :

public function cart()
    $order = $this->Clients_products->newEntity();

    if ($this->request->is('ajax')) {
        $order->client_id = 2;
        $order->product_id = 2;

        if ($this->Clients_products->save($order)) {
            $this->Flash->success(__('OP!! OP!! OP!!.'));
            $this->Flash->success(__('Hyi v sraky jitsa v rot.')); 

it`s my BD :


What do you mean by “nothing happens”? You get no message at all? Success message but it didn’t save? Failure message?

I solved this problem myself. It was necessary to add a field with a primary key to the table.

Thank you for your time