As Richard states, you need to use bindModel to force a join from
Auction to User. I assume Auction belongsTo Bid as LatestBid and
therefore the first query containable runs will include a join to
LatestBid.
Therefore you need to run the following before your paginate call
$this->Auction->bindMod
You have to use $this->Model->bindModel() to help cake with the joins:
http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
has some examples further down the page.
On Apr 1, 4:05 pm, Zac Tolley wrote:
> I've done complex selection before, the difference here is that is
> seems to split th
I've done complex selection before, the difference here is that is
seems to split the operation up into multiple queries and I can't see
how I would do it in this situation... I'm going to give it a stab and
see what happens.
On Apr 1, 4:01 pm, Jeremy Burns wrote:
> It's a bit tricky, but you can
It's a bit tricky, but you can do 'ORs' and ANDs':
http://book.cakephp.org/view/1030/Complex-Find-Conditions
Jeremy Burns
jeremybu...@me.com
On 1 Apr 2010, at 15:58, Lucca Mordente wrote:
> I don't know whether it's possible... I think custom query would be the best
> solution.
> Lucca Morden
I don't know whether it's possible... I think custom query would be the best
solution.
Lucca Mordente
On Thu, Apr 1, 2010 at 11:52 AM, Zac Tolley wrote:
>
> I'll give that a go, but then I want to use or's... like I want to to
> say if user.username = 'xyz' or item.name = 'xyz'
>
> Check ou
I'll give that a go, but then I want to use or's... like I want to to
say if user.username = 'xyz' or item.name = 'xyz'
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to th
have you tried just to add 'conditions' in User array?
doesn't it work?
On 1 abr, 06:59, Zac Tolley wrote:
> I'm trying to use a combination of the 'contains' behaviour,
> pagination and filters to generate data to show in a table. The
> application is an auction app that has auctions, which have
I'm trying to use a combination of the 'contains' behaviour,
pagination and filters to generate data to show in a table. The
application is an auction app that has auctions, which have bids on
them and each bid is also associated with a user.
Auction
Item
Attribute
LatestBid
User
In