title: Saving model in afterSave() in cakePHP
body: <p>I have a form with a file upload field in it and I have created a model behaviour file to handle file processing.</p>
  
  <p>I have two functions, beforeSave and afterSave:</p>
  
  <p>In beforeSave I do some stuff and then set the file value in data to null so it can be saved. Else it will try to save an array, and the database expects just a string (the file name)</p>
  
  <p>In afterSave I generate a new file name based on some text fields on the form, and add the lastInsertId infront of it. I also move the file from temp to desired location.
  This all works fine, but when I try to save the new filename to the Model it just doesnt work.</p>
  
  <p>I have done a lot of test and debugging, and also spent hours searching online. The conclusion is that you can not save in afterSave, it triggers itself and will run beforeSave again.</p>
  
  <p>So my question is, how can I update the newly inserted model? The filename inserted need to have the primary key in its name, and its unknown at time of beforeSave.</p>
  
  <p>grateful for any help!
  jason</p>