Re: Dealing with MASSIVE Model Files

2015-09-09 Thread Jeremy Burns : Class Outfit
I sometimes splice chunks out into behaviours for this reason. > On 9 Sep 2015, at 08:35, Michael Houghton wrote: > > I have some big projects in CakePHP and always follow the Fat Models, Skinny > Controllers approach. > > The issue I have now, is some of my model fi

Dealing with MASSIVE Model Files

2015-09-09 Thread Michael Houghton
I have some big projects in CakePHP and always follow the Fat Models, Skinny Controllers approach. The issue I have now, is some of my model files are 5000 lines! Is there a better way to decouple code that putting it all into the model files. How could this code be separated into smaller

Re: Load models without model files

2011-06-15 Thread Dr. Loboto
Make stub model with $useTable = false, load it, then call $this- >setSource('table_name') on it. Or list all "static" models in AppModel, overwrite __construct() there and set $useTable to false there for any not listed name. On 16 июн, 02:49, "qua...@gmail.com" wrote: > Hi, > > I have tables t

Load models without model files

2011-06-15 Thread qua...@gmail.com
Hi, I have tables that are created on the fly and I'd like to access it thru Model. Since those tables are dynamically created, I don't have the model .php files for them. The tables are created conforming to Cake's naming convention. I tried to use loadModel() to load them but Cake still complain

Re: Model Files do not get read in by the system.

2009-10-07 Thread AD7six
On 8 oct, 01:15, paullb wrote: > Thanks Miles J, I made that change and it worked perfectly. What you have > suggested here is definitly not intuitive from the naming conventions in the > link provided earlier. Please edit the sentance "The Model class OptionValue would be found in a file name

Re: Model Files do not get read in by the system.

2009-10-07 Thread Jon Bennett
attempts to create models when required, so if you have a miss-named model file, but everything else is ok, cake will create the model at runtime. It's a core feature, I believe it's used to create the 'with' associations etc, so you don't need to create model files explicitly

Re: Model Files do not get read in by the system.

2009-10-07 Thread paullb
request. >> >> > That's not relevant. >> >> > paullb - see conventions[1] your class isn't named correctly, and >> > neither is your model file. >> >> > hth, >> >> > AD >> > [1]http://book.cakephp.org/search/conven

Re: Model Files do not get read in by the system.

2009-10-07 Thread Miles J
each request. > > > That's not relevant. > > > paullb - see conventions[1] your class isn't named correctly, and > > neither is your model file. > > > hth, > > > AD > > [1]http://book.cakephp.org/search/conventions > > -- > View

Re: Model Files do not get read in by the system.

2009-10-07 Thread paullb
t; > That's not relevant. > > paullb - see conventions[1] your class isn't named correctly, and > neither is your model file. > > hth, > > AD > [1] http://book.cakephp.org/search/conventions > > > > > -- View this message in context: ht

Re: Model Files do not get read in by the system.

2009-10-07 Thread AD7six
On 7 oct, 21:23, AD7six wrote: > On 7 oct, 19:46, brian wrote: > > > You're the second person today. Clear out app/tmp/cache/models/ and > > set debug > 0 to have Cake check the model schema on each request. > > That's not relevant. > > paullb - see conventions[1] your class isn't named correc

Re: Model Files do not get read in by the system.

2009-10-07 Thread AD7six
On 7 oct, 19:46, brian wrote: > You're the second person today. Clear out app/tmp/cache/models/ and > set debug > 0 to have Cake check the model schema on each request. That's not relevant. paullb - see conventions[1] your class isn't named correctly, and neither is your model file. hth, AD

Re: Model Files

2009-10-07 Thread AD7six
On 7 oct, 15:22, Brendan Paull wrote: > 3 questions for the group regarding Models > > 1. Does CakePHP even read the contents of the model files. I run my > code, then I completely clear the contents of the file or put garbage > data in for values such as $useTable and there i

Re: Model Files do not get read in by the system.

2009-10-07 Thread brian
You're the second person today. Clear out app/tmp/cache/models/ and set debug > 0 to have Cake check the model schema on each request. On Wed, Oct 7, 2009 at 9:51 AM, paullb wrote: > > > I have noticed that my model files do not get read by Cake -AT ALL-. I put > garbage

Re: Model Files

2009-10-07 Thread Miles J
Try clearing the cached versions first. On Oct 7, 6:22 am, Brendan Paull wrote: > 3 questions for the group regarding Models > > 1. Does CakePHP even read the contents of the model files. I run my > code, then I completely clear the contents of the file or put garbage > data in

Re: Model Files

2009-10-07 Thread brian
On Wed, Oct 7, 2009 at 9:22 AM, Brendan Paull wrote: > > 3 questions for the group regarding Models > > 1. Does CakePHP even read the contents of the model files. I run my > code, then I completely clear the contents of the file or put garbage > data in for values such as $use

Model Files do not get read in by the system.

2009-10-07 Thread paullb
I have noticed that my model files do not get read by Cake -AT ALL-. I put garbage characters into one file and it didn't impact the running at all. Obviously if the file was readin I would have got a syntax error. Could someone please enlighten me as to what is going on here? The progr

Model Files

2009-10-07 Thread Brendan Paull
3 questions for the group regarding Models 1. Does CakePHP even read the contents of the model files. I run my code, then I completely clear the contents of the file or put garbage data in for values such as $useTable and there is absolutely no effect. If CAKE is not going to read the model file

Re: Using CakePHP-bake , some of the database table names get changed in model files...why is it so?

2009-07-24 Thread Carlos Suarez Fontalvo
I'm not understanding you. But, it seems you are not using the bake shell properly. In linux you must type: cakbe bake or cake bake model, and when it asks for params lets say name of the table (is the name cake expect the table might have). but if your table doesnt follow cakephp conventions, you

Using CakePHP-bake , some of the database table names get changed in model files...why is it so?

2009-07-23 Thread Anibigi
Hi, I am using Bake to create models for my database tables. I have run into a little problem. I have 25 tables I strated baking the models until for one of the database tables the bake started giving a name of it own to the model,file and class. For example ,the table in database is name

Re: Single controller file to access multiple model files

2009-07-13 Thread thatsgreat2345
2 fields happen, msg. gets displayed if user > > does not fill in the form. But for the other two tables, the > > validation messages do not get displayed. Though the fields are set as > > mandatory, even when user submits a form without entering those fields > > the form is get

Re: Single controller file to access multiple model files

2009-07-13 Thread Vijay Kumbhar
> > The validation for first 2 fields happen, msg. gets displayed if user > does not fill in the form. But for the other two tables, the > validation messages do not get displayed. Though the fields are set as > mandatory, even when user submits a form without entering those fields >

Single controller file to access multiple model files

2009-07-13 Thread Sheetal
fields are set as mandatory, even when user submits a form without entering those fields the form is getting submitted. Now I want to display the validation msgs. from the other 2 model files too... How to achieve this? I read something abt $uses array... but I don't understand as to how to put it