Ah, thanks a lot ... by adding function
removeFieldFromSchema($fieldname) {        unset($this-
>_schema[$fieldname]);}
to my AppModel I can change the schema.
What I don't quite get ... $_schema is a protected variable, so I
should be able to change it in my inherited model class, shouldn't I?
MyModel extends AppModel extends Model ... so unset($model-
>_schema['field']) should give  the same result as unset($this-
>_schema['field'] )
Anyway, the only thing I don't like about this is that my behavior is
now dependent on a custom method. Shouldn't be there an "official"
cake way of manipulating the model's schema?
wirtsi

On 5 Jan., 17:16, José Lorenzo <[email protected]> wrote:
> Expose a method in your model having that line you want to execute. You
> will be able to execute the method from outside the model instance.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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