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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>
> 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
>
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
22 matches
Mail list logo