I do not see how you can achieve this since the model to bind will
depend of the current model. Unless you define a static array into the
app_model (base) and call a function there that can then know which
model you are calling from, I do not see another way.
I have seen someone writing a bindModel that would bindOnly the model
given, without having to unbind the "based one" and wihtout the mention
the associations..

I think the first solution might be the best.


On Oct 25, 7:07 pm, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I'm wondering if there's a way to dynamically load the fields into
> bindModel()?
> Basically I have a model method which I want to share between a few models.
> This method calls bindModel() to another Model but this bound model will be
> different depending on which model calls the method. Therefore I need a way
> to give bindModel() the set of fields specific to the model to be bound
> with?
>
> I could hard code them and use an if/else but is there a more elegant way?
> 
> All suggestions appreciated.
> 
> Cheers,
> 
> Sonic


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to