Hi

I am trying to save a new record using one model but take one of the fields
in the form which is not linked to any models, take the value from it and
then subtract that value from another field of a different model.  The first
model has a belongsTo relationship with the second. 

e.g.  A user creates a Project, this project has a budgetLeft field. The
user then creates diary entries for this project.  When the user creates a
diary entry they specify how much of the budget they have used in a form
field called budgetUsed, this field is not linked to any models. When the
user submits the form, the controller should created the diary record then
take the value from the budgetUsed field, subtract that from the budgetLeft
field and then updates that Project record.

Thanks.
-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Saving-to-one-model-while-updating-another-tp3301880p3301880.html
Sent from the CakePHP mailing list archive at Nabble.com.

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