Wednesday, November 30, 2011

Re: Has many problem


Hugo Massaroli


2011/11/30 phpMagpie <paul@webbedit.co.uk>
Option 2 does not look normalized to me as data1, data2, data3 should be in an associated table Process hasMany Data <-> Data belongsTo Process.

It's normalized because data1, data2 and data3 are always the same fields, they don't change with the 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");

Thanks! I've got the idea. If I respect the order problems shouldn't appear :)

--
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: