>
> for example is there a way to fetch some data form joined table and
> delete or update them with obj->save()
>
You can save() only associated Row objects that correspond to a single row
in the database. A Row object that is the result of a join must be
read-only, because Zend_Db isn't smart enough to track which columns
correspond to which table.
As long as each Row object is non-joined, i.e. you fetched it from a single
table, you can save() that Row. It's okay to specify WHERE conditions,
ORDER BY sorting, or LIMIT. It's also okay to save() Row objects that you
fetch using the table-relationships methods.
But any JOIN, GROUP BY or HAVING clause makes it potentially ambiguous which
rows in the database correspond to those you call save() on, so Rows
returned from queries with these clauses should be read-only. In this case,
you must fashion the updates or deletes manually.
Regards,
Bill Karwin
--
View this message in context: http://www.nabble.com/Delete%2C-update-and-insert-in-joined-table-%28model%29-tp18790541p18792639.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论