Re: Cake 1.2 pagination using hasAndBelongToMany association!

2007-02-22 Thread nate

This is not currently supported.

On Feb 22, 2:52 am, "Vu Nguyen" <[EMAIL PROTECTED]> wrote:
> I'm having this problem with cake 1.2 pagination: Things work well if
> I just want to search and paginate data on 1 model (i.e: 
> $this->paginate("Entry", $condition);)
>
> However, if Entry can have and belong to many Tags (I have table
> entries_tags and table tags), I want to search and paginate all
> entries with certain names and certain tags, i.e:
> $this->paginate(array("Entry.name" => "blah blah", "Tag.name" =>
> "nonsense"));
>
> This doesn't work, Cake will just search in the table of the current
> controller (if I put this in Tag controller then it will search in
> tags table only, which will break the sql)
>
> I think bindModel might be the solution, but I can't figure out how to
> do it.
>
> Any suggestion please?
>
> Thank you so much.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Cake 1.2 pagination using hasAndBelongToMany association!

2007-02-21 Thread Vu Nguyen

I'm having this problem with cake 1.2 pagination: Things work well if
I just want to search and paginate data on 1 model (i.e: $this-
>paginate("Entry", $condition);)
However, if Entry can have and belong to many Tags (I have table
entries_tags and table tags), I want to search and paginate all
entries with certain names and certain tags, i.e:
$this->paginate(array("Entry.name" => "blah blah", "Tag.name" =>
"nonsense"));

This doesn't work, Cake will just search in the table of the current
controller (if I put this in Tag controller then it will search in
tags table only, which will break the sql)

I think bindModel might be the solution, but I can't figure out how to
do it.

Any suggestion please?

Thank you so much.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---