Hi Andrew,

you wrote:
> I only granted access to that one column to the web user account, but
> that appears to be insufficient since the query generated by the
> validator by way of Zend_Table attempts to select all columns:
> 
> SELECT TOP 1 "InviteeCredentials".*, "InviteeCredentials"."LoginID"
> FROM "InviteeCredentials" WHERE ("LoginID" = '[email protected]')
> 
> I can get around this by either granting SELECT permissions to the
> whole table or by building a view that contains only the column(s) I
> want the web user to be able to select, but that should not be
> necessary, kind of like driving a tack with a sledgehammer. Why does
> the validator need to include any columns other than the one that you
> pass to the constructor? For that matter, this query would provide all
> the information the validator needs to be able to do its job:
> 
> SELECT TOP 1  'Exists' AS 'Exists' FROM "sometable" WHERE "somecolumn"
> = 'testvalue'

I ask the same question some days ago without any response [1] but someone has 
changed it [2].
Are you using the latest ZF version?


See also:
=========
[1] 
<http://www.nabble.com/Zend_Validate_Db_Abstract-ineffecttive-and-expensive--tt23917431.html#a23917431>
[2] <http://framework.zend.com/code/changelog/Zend_Framework?cs=16010>


-- 
Regards,
Thomas



Reply via email to