Affects Version/s: 1.2.3
Fix Version/s: None
Environment:Windows server 2003 PHP 5.2.17 / XP PRO 32bits XAMPP PHP 5.3.5
MSSQL / MYSQL
When I want to do a simple update like this :
$batches = ExamResultsBatchTable::getInstance()->retrieveByExamBatchStatus(ExamResultsBatch::valid_status_code);
foreach($batches as $batch)
Only exam_batch_status_id and status_date should be updated (see screenshot before), but columns exam_batch_status_id ,status_date AND exam_subject_id are updated,with the same value (23) (screenshot after_with_save).
If I run this:
$toto = Doctrine_Query::create()
>where('erb.id = ?' , $batch>getId())
Everything is correctly done.
here is the simpliest case.
The same problems are signaled on other tables in the database, but different tables can be impacted by one save() (the execute() query still works fine).
Example : 2 foreign tables will be updated , even if the save() action should only concern the main table, and one field (which is not a foreign key).
The corresponding foreign key fields in the 2 foreign tables, will be updated with the value given (here 23).
Because save() is used in a lot of different places in our app, I need to find a solution to fix save(), or if not possible to override it to run a execute()like query.
Thanks for your help.
Don't hesitate to ask if you want more details.