Saving data with join table

I saw several threads here with the same question but no one helped me.
I try to save data in an object with jointable.
First object is a worker
And the worker has many PLZ

$this->belongsToMany('PLZ', [
            'foreignKey' => 'worker_id',
            'targetForeignKey' => 'plz_id',
            'joinTable' => 'workers_plz',
            'dependent' => true
        ]);

There is a table plzTable wich contains plz_id and plz_no

When I try to create a worker, I will search for the plz_id in the plzTable.
This works fine.

But when I try to fill in the plz_id in the worker object, I receive an error.

worker->PLZ->id = $plz->id;

Errormessage:
Attempt to assign property “id” on null

But the worker object is not null and when I check the accessibility the the PLZ is true.
I am really not sure how cakephp saves data in a join table.
Maybe someone can help

I recommend to stop using non-conventional naming. This will only get you in trouble, and likely already has.

$this->belongsToMany(‘CamelCaseNaming’, […]

etc

Also, never directly assign the primary keys, never needed in these cases.
Create workers using the documented newEntity() etc.

Or did you want to assign this to a foreign key? $worker->pivot_table->plz_id = .. ?