Try beforeFind() in your AppController.
see http://bakery.cakephp.org/articles/view/soft-delete-behavior vor
an example.

Pretty new to cake, but this should help ;)
-- leo.

On 6 Mai, 17:35, haircut <[EMAIL PROTECTED]> wrote:
> Each table in my database has a "company_id" column. For each company
> that uses this application, they will ONLY be seeing rows that match
> the logged-in user's company_id (stored as a session var). So, for any
> findAll, read, etc calls I've having to send a WHERE clause of
> company_id = $this->Session->read('cid').
>
> Is there a way to modify AppModel or DboSource or whatever so that
> this redundant WHERE clause gets automatically pegged on to the query?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to