[eluser]Mirage[/eluser]
Sorry for the double post in 1.5.3 - I reposting here:
Question: Why doesn't DataMapper automatically try to insert new relations. Right now I have to save related items before I can save the relation itself
Code:
// Each contribution record has ONE transaction
// This works:
$contrib = new Contribution();
$trans = new Transaction();
$trans->save();
$contrib->save($trans);
// This doesn't work
$contrib = new Contribution();
$trans = new Transaction();
$contrib->save($trans);
Hope I'm making myself clear. Both objects represent NEW records - I'd have thought that if record has never been saved, DMZ would just go ahead and make it so.