Re: Weird SQL requests with CakePHP on an Oracle DataBase ?!!

2009-08-27 Thread Xanax

I found the reason : it's the alis GROUP.
This is a keyword reserved by ORACLE database engine.

How can i change the alias ? Perahps in the model of the table ?
Another solution is to change the tablename so it will change the
alias associated but i would have to change a lot of SQL request...
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Weird SQL requests with CakePHP on an Oracle DataBase ?!!

2009-08-27 Thread brian

I'm not familiar with Oracle syntax. Does it normally leave out the
"AS" when using an alias? If so, it looks ok to me. The table is
groups and the alias is Group.

On Thu, Aug 27, 2009 at 9:48 AM, Xanax wrote:
>
> Hi everyone,
>
> I've transfered all my data from MySQL to an Oracle Database.
> It used to work very well with MySQL.
>
> Now, when i try to launch my application, i've got weird request.
>
> I respected all tablename conventions from the CakePHP sites so i've
> set plural tablenames. For examples for the table "groups" here is the
> sql request from CakePHP :
>
> SELECT Group.id, Group.name, Group.parent_id, Group.lft, Group.rght,
> Group.commentaires, Group.created, Group.modified FROM groups Group
> WHERE 1 = 1 ORDER BY Group.lft asc
>
> Notice that it don't use the plural of Group AND at the end, in the
> "FROM", i've got the tablename two times.. I don't have any clue from
> where does it come and how can i fix this.:(
>
> Thanks in advance for any help
> >
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Weird SQL requests with CakePHP on an Oracle DataBase ?!!

2009-08-27 Thread Xanax

Hi everyone,

I've transfered all my data from MySQL to an Oracle Database.
It used to work very well with MySQL.

Now, when i try to launch my application, i've got weird request.

I respected all tablename conventions from the CakePHP sites so i've
set plural tablenames. For examples for the table "groups" here is the
sql request from CakePHP :

SELECT Group.id, Group.name, Group.parent_id, Group.lft, Group.rght,
Group.commentaires, Group.created, Group.modified FROM groups Group
WHERE 1 = 1 ORDER BY Group.lft asc

Notice that it don't use the plural of Group AND at the end, in the
"FROM", i've got the tablename two times.. I don't have any clue from
where does it come and how can i fix this.:(

Thanks in advance for any help
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---