Very frustrated with this. Sugar 6.3.0RC2. I cannot find any decent examples or documentation relating to this.

I have a custom module - prams_Batch. It has a one to many relationship to the prospects table - prams_batch_prospects. I need to save records in the relationship table - prams_batch_prospects_c.

I pulled this logic directly from the existing Campaigns module, so I'm not sure why it isn't working.

PHP Code:
$batch = new prams_Batch();
$batch->load_relationship("prams_batch_prospects");
$batch->prams_batch_prospects->add($prospect->id);
$batch->save(); 

Batch records are saving to the main prams_batch table, but not the relationship table (prams_batch_prospects_c). Why?