> But what about my model configuration?
>
> <?php
>
> class News extends AppModel {
> var $name ='New';
> var $useTable = false;
> var $useDbConfig = 'MyDealZ';
> }
> ?>
> This configuration is needed in the tutorial, How rss data will be
> saved to my local database when model has this configuration?
Hmm, I suppose it won't be.
Seems to me this News model should be exclusively for getting data from Google News. If you also want to have the data locally in your own database, then you might need a separate model for that. After all, you may not want to have the same fields in your database as Google returns in their RSS. You may want to track additional items, or may not care to store about some of the data they send back.
The two models could certainly talk to one another, e.g. when you fetch something from the (Google News) News model, it could insert or update data in your database news model. Or you could turn it around, and make your database news model be the one you usually talk with, and it would return data from your own database, unless the data there is too old, in which case it would talk to the other model to load the data from Google.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment