Tuesday, September 4, 2012

Re: Create database table using controller.

On Sun, Feb 28, 2010 at 3:04 PM, veepee <vpchin@gmail.com> wrote:
> I've found the problem.
> It is caused by the listsources() method in cakephp has cached the

Right! and listsources() reads the list from a cache file similar to
myapp_cake_model_default_pathname_list

This cache file is updated/created when a page reloads by a call to
listsources()

> sources array which holds the array of tables available in database.
> My question now is, is it possible to reset the sources to null in my
> controller?

You have 2 options
- figure out how to delete the cache file and call listsources() again
- *redirect* to a new action after creating the table and use the new
model there

HTH
Tarique


--
=============================================================
PHP for E-Biz: http://sanisoft.com
=============================================================

--
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.

No comments: