You can use just the 'conditions' key if you set 'foreignKey' to
false. Using finderQuery doesn't activate all the automagic binding
and whatnot, so this is probably a better idea.

https://trac.cakephp.org/ticket/3323
https://trac.cakephp.org/changeset/6258

On Jan 15, 8:56 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> And of-course when I wrote conditions I was really talking about
> "finderQuery". Sorry.
>
> On Jan 15, 9:32 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I have a question that hasn't been on the table much. It is a bit of
> > an oddball scenario.
>
> > Can I use dynamic data from the model's table in the "conditions" for
> > an association?
>
> > I have a model that stores filter-rules. e.g. "email is from
> > cakephp.org" or "age is more than 40" things of this nature. These are
> > representative of an appropriate where-clause that finds the
> > corresponding items in another model filled with "people".
>
> > It all works when I "manually" search out the people. What would be
> > cool is if I could very cleanly use Cake's associations in some way.
>
> > I can use the hasMany property caled "conditions" to statically put my
> > filter-rule there for the whole class. But I would like to be able to
> > use the table-data in the condition. Each record using it's own "rule-
> > clause" Is this possible?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to