Q:

How to configure saving strategy (append) for belongsToMany Association?

i have a belongsToMany association which deletes joinTable data because i just put new connections inside the entity to be persited.
So i read here about the 2 strategys: append and replace.
Replace is the default one. But i could not find out yet how to set it to append strategy?

A:

You can define belongsToMany relation with saveStrategy keyword which accept either append or replace. So code should be like 
$this->belongsToMany('Articles', [
            'joinTable' => 'articles_tags',
            'saveStrategy' => 'append'
        ]);

For more check official Doc

