When retrieving the information for a User, we get associated models, such as
loans.
The view is the Users (for a particulat ID), with hasMany Loans, and Equipment
hasMany Loans.
How can I filter the loans model to give me only those which have been marked
as L for on loan.
User (id, name,
Use bindModel() to define the conditions. Something like this...
$this-User-bindModel(array('hasMany' = array('Loan' =
array('conditions' = array('on_loan' = 'L');
$users = $this-User-findAll();
Adam
On Dec 6, 1:17 pm, Gould, Adrian [EMAIL PROTECTED]
wrote:
When retrieving the information
Thanks Adam
will give it a go (well, will forward the answer to the person who needed to
know).
Adrian
-Original Message-
From: cake-php@googlegroups.com on behalf of Adam Royle
Sent: Thu 12/6/2007 12:46
To: Cake PHP
Subject: Re: Filtering views to show selected data
Use