Re: 404 Not found on existing controller and action

2008-01-20 Thread Saymons

I think you may have your DEBUG var (/app/config/core.php) set to 0
(production mode), which means that your cache isn't refreshed when
you create new pages etc.
So you should modify it to 1 or higher (development).

Good luck!

On 6 jan, 16:09, Robby Anderson <[EMAIL PROTECTED]> wrote:
> I've put "clearing the cache" on the top of my list of things to do
> before I go into "oh crap" mode. :) Seems to solve all kinds of
> problems. I keep meaning to create a small script to do it and then
> call the script from my server start script, among other places.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: So many queries for a belongsTo association...

2007-07-30 Thread Saymons

Why ? It is just a BelongsTo association, Cake joins this on other
cases...

On 26 juil, 20:27, majna <[EMAIL PROTECTED]> wrote:
>  cake cant join this. try with raw query.
>
> On Jul 26, 7:14 pm, Saymons <[EMAIL PROTECTED]> wrote:
>
> > Thanks for your answer, but that's not my problem, I need $this->Asset-
>
> > >recursive = 2; else, I won't get all the data I need about the Asset.
>
> > I don't understand why when my model gets the Composer, it does :
>
> > > > SELECT ... FROM tbl_composer WHERE component_id=12 -> gives me every
> > > > composite_id (let's say 15,17 and 21)
> > > > SELECT ... FROM tbl_asset WHERE id=15
> > > > SELECT ... FROM tbl_asset WHERE id=17
> > > > SELECT ... FROM tbl_asset WHERE id=21
>
> > And not something that looks more like :
> > SELECT ... FROM tbl_composer LEFT JOIN ... as Component ON... LEFT
> > JOIN ... as Composite ON ... WHERE component_id=12;
> > because the Composite and the Component belongsTo the Composer.
>
> > On 26 juil, 18:27, "Christopher E. Franklin, Sr."
>
> > <[EMAIL PROTECTED]> wrote:
> > > $this->Model->recursive = 0; <---try to put that beofre the
> > > findAll()... it will limit how manyqueriesare made and how much data
> > > is returned.
>
> > > Does this answer your question?
>
> > > On Jul 26, 8:12 am, Saymons <[EMAIL PROTECTED]> wrote:
>
> > > > Hi everyone,
>
> > > > I am using CakePHP 1.1.last_version_here and PostgreSQL 8.0.12
> > > > I have a question about the belongsTo association :
>
> > > > My models are the following :
> > > > Asset->HABTM Composer
> > > > Composer -> BelongsTo Composite(Asset) and Component(Asset)
>
> > > > So an Asset can have many "sons" and many "parents" of the same type.
>
> > > > When I'm loading an Asset, the models reads well the data about the
> > > > Asset himself, but when looking to the HABTM, it reads the Composer
> > > > table, and then for each row of the table, it reads the Composite and
> > > > the Component :
> > > > SELECT ... FROM tbl_asset WHERE id=12 -> gives me data about the asset
> > > > SELECT ... FROM tbl_composer WHERE component_id=12 -> gives me every
> > > > composite_id (let's say 15,17 and 21)
> > > > but then
> > > > SELECT ... FROM tbl_asset WHERE id=15
> > > > SELECT ... FROM tbl_asset WHERE id=17
> > > > SELECT ... FROM tbl_asset WHERE id=21
>
> > > > Is there a way that the Composer could join on the Asset table, not to
> > > > have so manyqueries?
>
> > > > Thx
>
> > > > PS : excuse my English, i'm french


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: So many queries for a belongsTo association...

2007-07-30 Thread Saymons

I found someone who has quite the same problem :
http://groups.google.com/group/cake-php/browse_thread/thread/b97c38e4c36fc781/5ec8f3b72282ce69?lnk=gst&q=queries&rnum=3#5ec8f3b72282ce69
https://trac.cakephp.org/ticket/2448

But in my case, there are not join at all, that makes me unhappy
because it could be faster, and I could sort all my stuff

On 26 juil, 21:06, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On Jul 26, 8:12 pm, Saymons <[EMAIL PROTECTED]> wrote:> Hi everyone,
> > I am using CakePHP 1.1.last_version_here and PostgreSQL 8.0.12
> > I have a question about the belongsTo association :
>
> > My models are the following :
> > Asset->HABTM Composer
> > Composer -> BelongsTo Composite(Asset) and Component(Asset)
>
>   
>
>FWIW, <http://groups.google.com/group/cake-php/web/frequent-
> discussions>
>
> --
>   
> Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: So many queries for a belongsTo association...

2007-07-26 Thread Saymons

Thanks for your answer, but that's not my problem, I need $this->Asset-
>recursive = 2; else, I won't get all the data I need about the Asset.

I don't understand why when my model gets the Composer, it does :
> > SELECT ... FROM tbl_composer WHERE component_id=12 -> gives me every
> > composite_id (let's say 15,17 and 21)
> > SELECT ... FROM tbl_asset WHERE id=15
> > SELECT ... FROM tbl_asset WHERE id=17
> > SELECT ... FROM tbl_asset WHERE id=21

And not something that looks more like :
SELECT ... FROM tbl_composer LEFT JOIN ... as Component ON... LEFT
JOIN ... as Composite ON ... WHERE component_id=12;
because the Composite and the Component belongsTo the Composer.

On 26 juil, 18:27, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> $this->Model->recursive = 0; <---try to put that beofre the
> findAll()... it will limit how many queries are made and how much data
> is returned.
>
> Does this answer your question?
>
> On Jul 26, 8:12 am, Saymons <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
>
> > I am using CakePHP 1.1.last_version_here and PostgreSQL 8.0.12
> > I have a question about the belongsTo association :
>
> > My models are the following :
> > Asset->HABTM Composer
> > Composer -> BelongsTo Composite(Asset) and Component(Asset)
>
> > So an Asset can have many "sons" and many "parents" of the same type.
>
> > When I'm loading an Asset, the models reads well the data about the
> > Asset himself, but when looking to the HABTM, it reads the Composer
> > table, and then for each row of the table, it reads the Composite and
> > the Component :
> > SELECT ... FROM tbl_asset WHERE id=12 -> gives me data about the asset
> > SELECT ... FROM tbl_composer WHERE component_id=12 -> gives me every
> > composite_id (let's say 15,17 and 21)
> > but then
> > SELECT ... FROM tbl_asset WHERE id=15
> > SELECT ... FROM tbl_asset WHERE id=17
> > SELECT ... FROM tbl_asset WHERE id=21
>
> > Is there a way that the Composer could join on the Asset table, not to
> > have so many queries ?
>
> > Thx
>
> > PS : excuse my English, i'm french


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



So many queries for a belongsTo association...

2007-07-26 Thread Saymons

Hi everyone,

I am using CakePHP 1.1.last_version_here and PostgreSQL 8.0.12
I have a question about the belongsTo association :

My models are the following :
Asset->HABTM Composer
Composer -> BelongsTo Composite(Asset) and Component(Asset)

So an Asset can have many "sons" and many "parents" of the same type.

When I'm loading an Asset, the models reads well the data about the
Asset himself, but when looking to the HABTM, it reads the Composer
table, and then for each row of the table, it reads the Composite and
the Component :
SELECT ... FROM tbl_asset WHERE id=12 -> gives me data about the asset
SELECT ... FROM tbl_composer WHERE component_id=12 -> gives me every
composite_id (let's say 15,17 and 21)
but then
SELECT ... FROM tbl_asset WHERE id=15
SELECT ... FROM tbl_asset WHERE id=17
SELECT ... FROM tbl_asset WHERE id=21

Is there a way that the Composer could join on the Asset table, not to
have so many queries ?

Thx

PS : excuse my English, i'm french


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---



About Model::save

2007-01-07 Thread Saymons


I have a question, maybe a newbie's one, but still a question :
When I do : $this->ModelName->save($data);
Is only $data['ModelName'] saved ?
Are the dependent model's data saved ?
Are all the model's data saved ?

I want to know if I have to check this before data saving, because I
don't want the user to modify other models than the ones he's allowed
to access.

(Excuse my english, I'm French and I need to improve it ;))


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---