The rationale is simple:
Until a row object is saved, there _IS NO_ row and therefore there
_CAN'T_ be any dependent rows (at least if referential integrity is
maintained).
Indeed, there _AREN'T_ any rows, so one could argue that an empty
rowset is the correct response, but that would be the same as if
reading from a non-existent file returned 0 bytes instead of an error.
Sure, there aren't any bytes, but there can't be any either.
Jaka
On 26. Feb 2009, at 16:54, Ralph Schindler wrote:
> Link: http://framework.zend.com/issues/browse/ZF-5699
>
> Title: Zend_Db_Table_Abstract::findDependentRowset throws an error
> when
> called on unsaved Zend_Db_Table_Row (with PDO_MYSQL)
>
> Hi all,
>
> Take a moment to review the above (if you are interested), as I am
> soliciting feedback as per what to do.
>
> My question is, in such situations, should this return an empty
> rowset, or
> should it throw an exception?
>
> Please leave comments in the issue.
>
> Thanks!
> Ralph
>
>
>
> --
> Ralph Schindler
> Software Engineer | ralph.schindler@zend.com
> Zend Framework | http://framework.zend.com/
>
>
没有评论:
发表评论