Wednesday, November 30, 2011

Re: Has many problem

Option 2 does not look normalized to me as data1, data2, data3 should be in an associated table Process hasMany Data <-> Data belongsTo Process.

When editing you echo each records id and therefore the save call will update the correct record.  
echo $this->Form->input("Process.0.id");
echo $this->Form->input("Process.0.process_name");
echo $this->Form->input("Process.0.cost_type");

You specify an order attribute when fetching the data to be displayed in the edit form and it is this that determines the order the records are displayed in.

HTH, Paul.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: