Re: model behaves mysteriously
Model meta data (schema) is cached automatically, so that Cake doesn't have to run a describe query on every table all the time. I believe this is periodically refreshed even in production mode (don't quote me on that), but when you need to update something in production mode, you're best to manually delete the cache files- although I believe you can clear the cache via PHP method calls too. On May 18, 7:55 pm, Benni Graf <[EMAIL PROTECTED]> wrote: > Hi there! > > Indeed, deleting the cached models resolved the problem. Great, > thanks! > > But still I don't know, why the models got cached. I didn't activate > caching anytime (btw., is this the caching-option I can activate in > the core-config?). Or is this kind of caching activated by default? > > Thanks, Benni. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: model behaves mysteriously
Hi there! Indeed, deleting the cached models resolved the problem. Great, thanks! But still I don't know, why the models got cached. I didn't activate caching anytime (btw., is this the caching-option I can activate in the core-config?). Or is this kind of caching activated by default? Thanks, Benni. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: model behaves mysteriously
Hi, Isn't this just a matter of model data being cached in app/tmp/cache/ models/ ? Piotr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: model behaves mysteriously
Your model was cached. When running with $debug > 0 the cache is ignored. On Fri, May 16, 2008 at 11:28 PM, Benni Graf <[EMAIL PROTECTED]> wrote: > > Hi there, folks... > > I have a very strange Problem with my UserComment-Model. > It consists of the fields id, submittedby, user_id, comment, created > and modified. And lately I added the field "checked", to implement a > new feature into my page. I added "checked" with: > ALTER TABLE `user_comments` ADD `checked` INT( 1 ) NOT NULL DEFAULT > '0'; > which sets the checked-field in every already inserted line to 0, > because it's the default. > > But when I print_r my current model, cake still just gives me the > fields which have already been there: > [UserComment] => Array ( >[id] => >[submittedby] => >[user_id] => >[comment] => >[created] => >[modified] => ) > (I snipped the content...) > > I'd think the checked-field just isn't there, then, BUT: When I switch > from Debug = 0 to Debug = 1 or more, the checked-field mysteriously > occurs! A print_r shows me it's precence in the UserComment-Array > (with the value 0) and the features I've coded useing the field work > without problems! > > Actually it can't be the solution to run the app in debug-mode, so > could you help me find out, why the checked-field behaves like this? > > Nice Greetings and thanks, > Benni > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
model behaves mysteriously
Hi there, folks... I have a very strange Problem with my UserComment-Model. It consists of the fields id, submittedby, user_id, comment, created and modified. And lately I added the field "checked", to implement a new feature into my page. I added "checked" with: ALTER TABLE `user_comments` ADD `checked` INT( 1 ) NOT NULL DEFAULT '0'; which sets the checked-field in every already inserted line to 0, because it's the default. But when I print_r my current model, cake still just gives me the fields which have already been there: [UserComment] => Array ( [id] => [submittedby] => [user_id] => [comment] => [created] => [modified] => ) (I snipped the content...) I'd think the checked-field just isn't there, then, BUT: When I switch from Debug = 0 to Debug = 1 or more, the checked-field mysteriously occurs! A print_r shows me it's precence in the UserComment-Array (with the value 0) and the features I've coded useing the field work without problems! Actually it can't be the solution to run the app in debug-mode, so could you help me find out, why the checked-field behaves like this? Nice Greetings and thanks, Benni --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---