0

I am getting data from two tables using join and putting setIntegrityCheck(false) in my model. Now I need to call save() on that object. I know when you put setIntegrityCheck(false), you cannot call save(), delete() or update() to this object. I have seen this question, but it doesn't address the answer.

So any way around?

Community
  • 1
  • 1
Awais Qarni
  • 17,492
  • 24
  • 75
  • 137

1 Answers1

0

ZF supports only Table data gateway and row data gateway pattern. AFAIK setIntegrityCheck() will only allow you to join tables within Db_Table_Select which will help you to build SQL query. Anyway you can not hydrate custom SQL results to Db_Table_Row objects - which supports save(). You have to simply update each row separatly. For more sofisticated approach you will have to use data mapper pattern - like Doctrine.

Michal Vrchota
  • 326
  • 2
  • 6