Bug on my AROS... :(
Hello, I don't understand my bug. I've created a "parent_node" function on my user model that return a role_id. Every user have a role. When i create a new user, it create also an ARO associated with the proper role. The problem is that EVERY user is registred as ADMIN role. Whereas when i verify what return "parent_node" , it returns the good value i.e. the actual role that i've given to the user... Do you know what can be the problem please ? Thanks in advande for any help because i really don't figured out what's the point with that. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Simple question : model file of a Join Table ?
Hello, I need to configure the model of a join table. Actually, like in my others models, i just need to add this thing : var $sequence = 'MY_SEQUENCE'; I tried to create a model file with the name of the table (singular, whithout the 's') but it doesn't seems to work or perhaps i missed something. Do you know how i could do this thing ? Thanks in advance --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can i modify properties of ACL models please ? :-0
Hello everyone, My problem is simple. I need to specify the "$sequence" variable in all my models because i use sequences to handle the autoincrement id of my Oracle Primary keys. I created three file in my model folder :aco.php, aro.php, aro_aco.php juste with this code : But this code isn't take into account, it doesn't work whereas it works for all my others "classic" tables. Any ideas of how i can modify the configuration of the ACL models ? Thanks in advance. --~--~-~--~~~---~--~~ 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: CakePHP doesn't use my sequence.......
Hello, Thanks for your answer. I've seen this page, i had already modified my code like it is recommanded. I have the version just before the latest stable CakePHP 1.2.5 : mine is 1.2.4.8284 I've seen the changelog of the 1.2.5 version, it doesn't seems that this version correct a bug relatively to Oracle. Any suggestions ? Thanks in advance. On 17 oct, 05:59, Dérico Filho wrote: > Check out this bug, see if it has anything to do with > you:https://trac.cakephp.org/ticket/4181 > > Which CakePHP version you're using? Please, make a backup from your > code, and try pulling from d...@code.cakephp.org:cakephp.git to see if > this problem is solved with latest devel version. > > []s > Dérico Filho > > On Oct 16, 10:48 am,Xanax wrote: > > > Good morning everyone, > > > I'm using CakePHP with Oracle and sequences (i can't use triggers > > because it's forbidden in my company...) > > > I CAN'T add record to my database through my CakePHP app. > > > I respected all naming conventions. > > > I have a table name "PROJET", his ID is a"number" type, not null. > > I've created a sequence called "PROJET_ID_SEQ' AND 'PROJETS_ID_SEQ'. > > I've launch "select PROJET_ID_SEQ.nextval from dual" and "select > > PROJET_ID_SEQ.nextval from dual" because if you lauch a "select > > PROJET_ID_SEQ.currval from dual" ORACLE crashes saying you must do a > > nextval at the first time... > > > Plus i added : > > var $sequence = 'PROJETS_ID_SEQ'; > > in my projet sequence to be more explicit... > > > Then i try to add a new project > > When i launch the debug from the dbo_oracle.php and i display > > "$model->sequence", it shows up : > > > PROJETS_ID_SEQ > > > So it's looks fine... BUT it doesn't work at all. He seems that > > Cakephp doesn't use this sequence so i have this error : > > SQL Error: ORA-01400: cannot insert NULL into > > ("PLAN_TEST"."PROJETS"."ID") > > > Do you have any idea of what i am missing please ? > > > Thank you very much for any help because i am relly getting mad about > > this! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CakePHP doesn't use my sequence.......
Good morning everyone, I'm using CakePHP with Oracle and sequences (i can't use triggers because it's forbidden in my company...) I CAN'T add record to my database through my CakePHP app. I respected all naming conventions. I have a table name "PROJET", his ID is a"number" type, not null. I've created a sequence called "PROJET_ID_SEQ' AND 'PROJETS_ID_SEQ'. I've launch "select PROJET_ID_SEQ.nextval from dual" and "select PROJET_ID_SEQ.nextval from dual" because if you lauch a "select PROJET_ID_SEQ.currval from dual" ORACLE crashes saying you must do a nextval at the first time... Plus i added : var $sequence = 'PROJETS_ID_SEQ'; in my projet sequence to be more explicit... Then i try to add a new project When i launch the debug from the dbo_oracle.php and i display "$model- >sequence", it shows up : PROJETS_ID_SEQ So it's looks fine... BUT it doesn't work at all. He seems that Cakephp doesn't use this sequence so i have this error : SQL Error: ORA-01400: cannot insert NULL into ("PLAN_TEST"."PROJETS"."ID") Do you have any idea of what i am missing please ? Thank you very much for any help because i am relly getting mad about this! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CakePHP + Sequences = weird problem...
Hello, I have a problem with a sequence in my cakePHP app. The problem is simple : when i call the nextval from a sequence, in a script, it increment by one only ONE time. IE when i do this : $sequence_planifications = $this->Planification- >query('SELECT PLANIFICATIONS_ID_SEQ.nextval from dual'); //here I use it to create a record in my DB $sequence_planifications = $this->Planification->query('SELECT PLANIFICATIONS_ID_SEQ.nextval from dual'); => there i have the id that is returned ! I tried, of course to set the nextval in another var but the problem remains... And when i lauch several time this query in a SQL+, it increment well. Do you know what i'm missing ? Thanks in advance for any help or clue. PS : here is the creation of my sequence, if it helps : CREATE SEQUENCE PLANIFICATIONS_ID_SEQ MINVALUE 1 MAXVALUE 999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE ; --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with saving id's
Hi everyone, I've got a little problem with my cake app'. My database is Oracle. Every data saving handled by cake engine works fine. The problem is with a 'manual' saving : $this->User->Planification->create($data_planification); $data_planification["Planification"]["user_id"] = $_POST ['user_id']; $data_planification["Planification"]["projet_id"] = $_POST ['projet_id']; $this->User->Planification->save($data_planification); This code doesn't work with my Oracle database while it used to work with MySQL database. When i add this line at the begining : $data_planification["Planification"]["id"] = 5678; It works, so i guess i've got a problem with my id. I thought that cake generate automatically id's and then save them in the database. I've created sequences, maybe i must retrieve the current sequence ? Or is there a thing that i've missed ? Thanks 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 -~--~~~~--~~--~--~---
Simple question !
Is it possible to create a "beforesave" method for all the models ? I mean in a file like app_controller which controll all the controllers --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Oracle & autoincrement : PROBLEM
Hi, I have a BIG problem. There is no autoincrement option in Oracle like in MySQL. Apparently, with CakePHP and Oracle, people use sequences and triggers to bypass this. My problem : I can't use triggers on my database, it's forbidden by my company. And of course i don't want to replace all the "model->save()" methods by their corresponding SQL request. Do you know what would be a good solution for me ? Thanks in advance --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
seTable for ACL tables ?...
Hello, Do you know if there is a way to set the "$useTable" variable for ACL tables ? I changed the names of "acos, aros, aros_acos" to "T_acos,T_aros,T_aros_acos" tables and i need to make a mapping beetween the new names and the models. I tried to create 3 models file acos.php etc... with var: $useTable = 'T_acos'; But it didn't work. Thanks in advance for any help because i didn't find the answers in the doc or in other forums. --~--~-~--~~~---~--~~ 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: Mapping beetween CakePHP attribute's model's names and real database table's names!
ok :( On 3 sep, 18:27, Miles J wrote: > If you hardcoded the column names, then yes you would have to change > them manually. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mapping beetween CakePHP attribute's model's names and real database table's names!
Hi, I would just like to know if it's possible to make this kind of mapping. Example : if I change the name of a column in my database. Must do I change also ALL the name of this column in all my php code ?... I know that in the model's file we can make a mapping with "usetable" for the real table used, is there the same thing for column's model ?... Thanks in advande --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Debug SQL requests in a log file ?
Hi, I've got some problems with my cakephp app : i have this message when i launch it : Fatal error: Maximum execution time of 30 seconds exceeded in C: \Program Files\EasyPHP 3.0\www\cake_1_2\cake\libs\model\datasources\dbo \dbo_oracle.php on line 357 I would like to know how it's possible to write all the sql requests that are launched by cake db engine in a log file because, as you can see, i don't know where does come from exactly the problem since in line 357 i have : $this->_numRows = ocifetchstatement($this->_statementId, $this- >_results, $this->_offset, $this->_limit, OCI_NUM | OCI_FETCHSTATEMENT_BY_ROW); 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 -~--~~~~--~~--~--~---
Re: Change the alias or the name of a table !!
Thanks a lot ! On 28 août, 06:52, "Dr. Loboto" wrote: > class MyModel extends AppModel { > $this->name = 'MyModel'; > $this->alias = 'MyPreferredAlias'; > $this->useTable = 'my_actual_table_name'; > > } > > On Aug 27, 11:13 pm, Xanax wrote: > > > Hi, > > > I need to change the alias OR the name of a table. > > > It's weird, i tried to change many variable whithout any changes on > > requests generated by Cakephp : > > > var $name > > var $useTable > > > The name of the controller (the name of the file AND the name of the > > class) > > The name of the model(the name of the file AND the name of the class) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Change the alias or the name of a table !!
Hi, I need to change the alias OR the name of a table. It's weird, i tried to change many variable whithout any changes on requests generated by Cakephp : var $name var $useTable The name of the controller (the name of the file AND the name of the class) The name of the model(the name of the file AND the name of the class) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
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+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 ?!!
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 -~--~~~~--~~--~--~---
Weird SQL requests with CakePHP on an Oracle DataBase ?!!
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 -~--~~~~--~~--~--~---
Connecting to ORACLE Database !
Hello, I've been developing my cakephp application with MySQL sor far and now i must migrate the database to an oracle one. I've created an oracle database and import the tables, everything wrked fine. Here an extract of the tsnames.ora entry concerning this databse : ORACLE_DPRO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.50.114.21)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = DPRO11)) ) In my databse.php, i've set up this : var $default = array( 'driver' => 'oracle', 'persistent' => false, 'host' => '10.50.114.21', 'login' => 'AZIZM', 'password' => 'AZIZM', 'database' => 'DPRO11', 'encoding' => 'UTF-8', 'prefix' => '', ); Whe i go to the test, cakephp show that the databse config gile is present and then nothing else, i think it bugs when he try to verify the connection... : Release Notes for CakePHP 1.2.1.8004. Read the changelog Your tmp directory is writable. The FileEngine is being used for caching. To change the config edit APP/config/core.php Your database configuration file is present. Do you have any idea of what should be the problem ? Thanks in advande, me i have no clue... --~--~-~--~~~---~--~~ 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: Can i display an Auth Message Error please ?
Thank you very much, i've just add : flash(); $session->flash('auth'); ?> and it works now Bye --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can i display an Auth Message Error please ?
Hi everyone, My problem is quite simple : i've setup auth and ACL in my application everything seems to work fine unless one thing : When a user try to launch a forbidden (for him) controllers/actions, it' just redirect him to another page autorized for him. I would just like to have an explicit message error like "You don't have access to this page. Please click here for being redirected..." Here are my Auth parameters for information : $this->Auth->actionPath = 'controleurs/'; $this->Auth->userModel = 'User'; $this->Auth->fields = array('username' => 'login', 'password' => 'password'); $this->Auth->loginAction = '/users/login'; $this->Auth->loginRedirect = '/users/index'; $this->Auth->loginError = "Identifiant ou mot de passe incorrects."; $this->Auth->logoutRedirect = '/planifications/index_users'; $this->Auth->authError = "Vous n'avez pas accès à cette page."; $this->Auth->autoRedirect = true; $this->Auth->authorize = 'actions'; As you can see i've setup properly the "$this->Auth->authError" property. Thank you very much for any help, have a good day! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---