I am switching up a table 'id' field and simple doing a find all, generate a
UUID, and try to update the field foreach but all its doing is creating new
empty records.
foreach($this->find('all') as $entry) {
$new = String::uuid();
$this->id = $entry['Entry']['id'];
//debug($this->id);
$this->saveField('id', $new);
}
If I remove the commented out debug() I get all the original id's but it
simply not update the record.
Even tried $this->updateAll(array('Entry.id' => $new), array('Entry.id' =>
$entry['Entry']['id']));
But that does not seem to work eiter.
Any ideas?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.