Thursday, August 27, 2009

Changing the alias giver to a table ! :)

Hi,

I have a problem with some SQL request in Oracle.

"GROUP" is a reserved keyword for Oracle.
And Cakephp generate some SQL request with this alias (because my
table's name is GROUPS).
So these request don't work until i change the alias from GROUP to
GROUPE for example.

I would like to know if it's possible to change the alias given to
this table.

I tried to change the name of the model and the name of the class by
doing this :

class Groupe extends AppModel {

var $name = 'Group'; //Like this, i don't have to change my code
... }

I have now a strage error : CakePhp generate a SQL request which is
"children" and that's all.
I use a treebehavior on this model.

I don't know from where this problem come...

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

No comments: