Hi, Mariano!
Thanks for the help - your suggestion fixed my behavior. I knew for
your bindable behavior in bakery but estimated it's too complex for my
purpose.
Thanks again for the help and happy baking.
On Apr 28, 5:30 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Senser: go through the API doc for bindModel() and you'll see that the
> changes you do through bindModel are only available for the next find()
> operation, after which the model bindings get reset to their original state.
>
> What you need is to tell bindModel not to reset it. On your behavior, change
> this:
>
> $model->bindModel(array('hasMany'=>$lang_model));
>
> For this:
>
> $model->bindModel(array('hasMany'=>$lang_model), false);
>
> The API doc is:
>
> http://api.cakephp.org/1.2/class_model.html#6b1a38f7a8ddb61cfa8539734...
>
> -MI
>
> ---------------------------------------------------------------------------
>
> CakeFest: December, 2008 - Buenos Aires, Argentina -http://es.cakefest.org
>
> blog:http://www.MarianoIglesias.com.ar
> twitter:http://twitter.com/mgiglesias
>
> On Apr 26, 12:07 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > Very strange, but if I don't execute any query on Offer before,
> > Categories are fetched OK, but if I run any query on Offer and other
> > models (Category & Type) broke.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---