Hello

There is a cakephp's way to clone register and all this relationship??
updating all the id field and created

Now i'm doing some like this

model.php

function clone($id) {

$this->find('first',array('conditions'=>array("Model.id"=>$id));

then search all this relationship and unset(a[model][model_id]) and
unset(a[model][created]))

foreach relationship do the same

and make an array like

$a[model][name] = "hola"
$a[relation1][0][name]="hi"
$a[relation1][1][name] = "hiii"

at the end do a $this->saveAll($a)

s.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to