Okay, take two: The (SQL) error your getting means that the Benchmark you want to save, has an invalid monitor_id So it's either empty or refers to a non-existing monitor This probably happens because you didn't select a monitor/server, because they were invisible on the form (they are rendered as sfWidgetFormInput To show the select s for these two, you have to go to the BenchmarkForm (which overrides the BaseBenchmarkForm and override the configure() method. Something like this: public function configure() { parent::configure(); $this->widgetSchema'monitor_id' = sfWidgetFormDoctrineChoice(array('model' => 'Monitor')); $this->widgetSchema'server_id' = sfWidgetFormDoctrineChoice(array('model' => 'Server')); $this->validatorSchema'monitor_id' = sfValidatorDoctrineChoice(array('model' => 'Monitor')); $this->validatorSchema'server_id' = sfValidatorDoctrineChoice(array('model' => 'Server')); }.
Okay, take two: The (SQL) error your getting means that the Benchmark you want to save, has an invalid monitor_id. So it's either empty or refers to a non-existing monitor. This probably happens because you didn't select a monitor/server, because they were invisible on the form (they are rendered as sfWidgetFormInputTo show the s for these two, you have to go to the BenchmarkForm (which overrides the BaseBenchmarkForm, and override the configure() method.
Something like this: public function configure() { parent::configure(); $this->widgetSchema'monitor_id' = sfWidgetFormDoctrineChoice(array('model' => 'Monitor')); $this->widgetSchema'server_id' = sfWidgetFormDoctrineChoice(array('model' => 'Server')); $this->validatorSchema'monitor_id' = sfValidatorDoctrineChoice(array('model' => 'Monitor')); $this->validatorSchema'server_id' = sfValidatorDoctrineChoice(array('model' => 'Server')); }.
When submitting the benchmark it says that the monitor and the server's values in the field are not valid – SymFoNyBegginer Aug 8 at 8:58 You also need to update the validators. See my updated code sample. :-) (And don't forget to accept my answer if it works ;-) ) – Grad van Horck Aug 8 at 9:20 Thank You Maaaan!
It worked! You'R my Champ! Haha – SymFoNyBegginer Aug 8 at 9:39 Would you please accept my answer then :-) – Grad van Horck Aug 8 at 10:33 I Accepted it!
– SymFoNyBegginer Aug 8 at 15:03.
Your refClass definition in the Server relations, can only point to a model with two fields: one field for each of the owning sides (in this case Server and Monitor). By creating a Many-To-Many relation this way, you can call $server->Monitors, and automatically uses this refClass to create a collection of Monitor (and not Benchmark). (As a user you don't see the refClass).
If you want to have more data in this 'coupling class' Benchmark, like you do, you'll have to work with to separate relations. Just drop the relation in the Server and you'll probably be done.
Thank you i'll try – SymFoNyBegginer Aug 5 at 11:48 Please read the question I modified it because I still can't replay mes own questions! – SymFoNyBegginer Aug 5 at 12:03.
Okay, take two: The (SQL) error your getting means that the Benchmark you want to save, has an invalid monitor_id . So it's either empty or refers to a non-existing monitor.
Your refClass definition in the Server relations, can only point to a model with two fields: one field for each of the owning sides (in this case Server and Monitor). By creating a Many-To-Many relation this way, you can call $server->Monitors, and automatically uses this refClass to create a collection of Monitor (and not Benchmark). (As a user you don't see the refClass).
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.