Re: Cascade delete and HABTM
Hi! I was wrong thinking on HABTM. Everything is working ok :-) Thanks! On 20 sep, 12:01, WebbedIT wrote: > You would not want to delete the associated Service as the nature of > HABTM means that Service could be associated with any number of other > ServiceCategory. > > HTH, Paul -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cascade delete and HABTM
My models are: #Service class Service extends AppModel { var $name = 'Service'; var $hasAndBelongsToMany = array( 'ServiceCategorie' => array( 'className' => 'ServiceCategorie', 'joinTable' => 'servicecategories_services', 'foreignKey' => 'service_id', 'associationForeignKey' => 'service_categorie_id' ) ); } #ServiceCategorie class ServiceCategorie extends AppModel { var $name = 'ServiceCategorie'; var $hasAndBelongsToMany = array ( 'Service' => array ( 'className' => 'Service', 'joinTable' => 'servicecategories_services', 'conditions' => '', 'order' => '', 'limit' => '', 'unique' => true, 'foreignKey' => 'service_categorie_id', 'associatedKey' => 'service_id', 'with' => 'ServiceCategorieService', ), ); } #ServiceCategorieService class ServiceCategorieService extends AppModel { var $name = 'ServiceCategorieService'; var $useTable = 'servicecategories_services'; } On 19 sep, 16:52, xamako wrote: > The "dependent" key is not avaible en > HABTMhttp://book.cakephp.org/es/view/1044/hasAndBelongsToMany-HABTM > > Thanks > > On 19 sep, 16:41, Thomas Ploch wrote: > > > > > > > > > Have you set the 'dependent' key in *both* relationship configurations? > > > Kind regards > > Thomas > > > Am 19.09.2011 16:32, schrieb xamako: > > > > Hi! > > > > I have the following relationship between HABTM tables: > > > > - services > > > - service_categories > > > - Servicecategories_services (the latter is what links the two tables > > > above) > > > > Well, what I get is that when you delete a table record > > > service_categories, records are automatically deleted from the table > > > "services" that are linked through the table > > > "servicecategories_services" ... but for some reason not behaves as > > > expected. > > > > Deleting a record from table "service_categories" automatically > > > deletes the records from table "servicecategories_services" but does > > > not remove records from the table "services" > > > > What am I doing wrong? > > > > Can anyone give me a solution? > > > > A greeting and thanks in advance. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cascade delete and HABTM
The "dependent" key is not avaible en HABTM http://book.cakephp.org/es/view/1044/hasAndBelongsToMany-HABTM Thanks On 19 sep, 16:41, Thomas Ploch wrote: > Have you set the 'dependent' key in *both* relationship configurations? > > Kind regards > Thomas > > Am 19.09.2011 16:32, schrieb xamako: > > > > > > > > > Hi! > > > I have the following relationship between HABTM tables: > > > - services > > - service_categories > > - Servicecategories_services (the latter is what links the two tables > > above) > > > Well, what I get is that when you delete a table record > > service_categories, records are automatically deleted from the table > > "services" that are linked through the table > > "servicecategories_services" ... but for some reason not behaves as > > expected. > > > Deleting a record from table "service_categories" automatically > > deletes the records from table "servicecategories_services" but does > > not remove records from the table "services" > > > What am I doing wrong? > > > Can anyone give me a solution? > > > A greeting and thanks in advance. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Cascade delete and HABTM
Hi! I have the following relationship between HABTM tables: - services - service_categories - Servicecategories_services (the latter is what links the two tables above) Well, what I get is that when you delete a table record service_categories, records are automatically deleted from the table "services" that are linked through the table "servicecategories_services" ... but for some reason not behaves as expected. Deleting a record from table "service_categories" automatically deletes the records from table "servicecategories_services" but does not remove records from the table "services" What am I doing wrong? Can anyone give me a solution? A greeting and thanks in advance. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Routing with parameters
Hi! I'm trying to rounting to a method of a controller with a specific parameter. What I'm trying to do is simulate a call like: www.web.com/portfolio/index/forsale:1 This is what I have so far, but I do not know how to add the parameter the call Router:: connect ('/ sitelocks', array ('controller' => 'portfolio', 'Action' => 'index')); Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Validate input select
Solved! The error was in the name of the field. Thanks! On 7 oct, 09:16, xamako wrote: > Hi, > > I'm trying to validate a select field. > > 'poblacion_id'=>array( > 'rule' => 'notEmpty', > 'message'=>"Debe seleccionar un valor."), > > Is it possible to validate that the user has selected a value? > > I'm use cake 1.3 > > Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Validate input select
Hi, I'm trying to validate a select field. 'poblacion_id'=>array( 'rule' => 'notEmpty', 'message'=>"Debe seleccionar un valor."), Is it possible to validate that the user has selected a value? I'm use cake 1.3 Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Checkbox not work fine
Hi, The column type is correct: tinyint(1) I assumed that if the field is needed only to type tinyint declare the label and the field, correct? input ('active', array ('label' => 'Active'))?> user_group_id is a combo, it works fine. The only checkbox is the 'active' field Thanks! On 23 sep, 14:04, MissYeh wrote: > 2 things: > > 1) Is the column type in the table set to boolean or tinyint(1)? > > 2) There is no array with the options passed in for your checkbox: > echo $this->Form->input('field', array('options' => array('option1', > 'option2'))); > > If user_group_id is supposed to be the checkbox then the type is > wrong, which then should be checkbox. > > Take a look at this > example:http://book.cakephp.org/view/1390/Automagic-Form-Elements#options-mul... > > Hope this solves your issue, let us know! :) > > Kana > > On Sep 23, 12:26 pm, xamako wrote: > > > Hi! > > > I have a problem with a checkbox. > > > I always get value 0. > > > My code is this:http://bin.cakephp.org/view/1438225730 > > > Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Checkbox not work fine
Hi! I have a problem with a checkbox. I always get value 0. My code is this: http://bin.cakephp.org/view/1438225730 Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Mod_rewrite not work
I've solved I changed EasyPHP by Xampp, and now everything works fine. Thanks On Jul 16, 12:33 am, Alok Mishra wrote: > File is not found root directory check link and file status > > Alok Mishra > A1 Technology Chandigarh > > > > On Fri, Jul 16, 2010 at 3:56 AM, xamako wrote: > > Good night > > > I am testing a website developed with cakephp, and seems to me a 404 > > error. > > > I have found that the mod_rewrite module is enabled, phpinfo (). > > > .htaccess files are correct, since they are the default files > > > Any ideas? > > > Thanks > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en > > -- > Alok Mishra Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 1.1.11.4064 and PHP 5.3.2 fails
First I am trying to migrate to version 1.2 Thanks On Jul 16, 12:38 pm, xamako wrote: > I am trying to upgrade to version 1.3, but there are many errors, you > know someone guide > > I've looked at: > > http://mark-story.com/posts/view/getting-a-new-oven-migrating-from-ca... > > http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2 > > Thanks > > On Jul 16, 9:35 am, xamako wrote: > > > Ok > > > I'm try upgrade to 1.2. > > > Thanks! > > > On Jul 16, 9:33 am, mike karthauser wrote: > > > > Cake 1.1.* is not compatible with php5.3. > > > > You are either going to need to upgrade your app to a recent version of > > > 1.2.* or find a version of php < 5.3 > > > > Mike Karthauser > > > Brightstorm limited > > > Tel: 07939252144 > > > > On 16 Jul 2010, at 08:26, xamako wrote: > > > > > Hi! > > > > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server > > > > PHP 5.3.2, but fails. > > > > > These are the errors: > > > > > Strict Standards: Redefining already defined constructor for class > > > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake > > > > \libs\object.php on line 69 > > > > > Deprecated: Assigning the return value of new by reference is > > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > > > \cake\libs\object.php on line 94 > > > > > Deprecated: Assigning the return value of new by reference is > > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > > > \cake\libs\security.php on line 48 > > > > > Deprecated: Assigning the return value of new by reference is > > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > > > \cake\libs\configure.php on line 82 > > > > > Strict Standards: Non-static method Configure::getInstance() should > > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www > > > > \amyadler\new_site\cake\bootstrap.php on line 43 > > > > > Strict Standards: Non-static method Configure::write() should not be > > > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler > > > > \new_site\cake\bootstrap.php on line 82 > > > > > Strict Standards: Non-static method Configure::getInstance() should > > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www > > > > \amyadler\new_site\cake\libs\configure.php on line 102 > > > > > Any solution? > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers > > > > with their CakePHP related questions. > > > > > 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 athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 1.1.11.4064 and PHP 5.3.2 fails
I am trying to upgrade to version 1.3, but there are many errors, you know someone guide I've looked at: http://mark-story.com/posts/view/getting-a-new-oven-migrating-from-cakephp-1-1-to-1-2 http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2 Thanks On Jul 16, 9:35 am, xamako wrote: > Ok > > I'm try upgrade to 1.2. > > Thanks! > > On Jul 16, 9:33 am, mike karthauser wrote: > > > Cake 1.1.* is not compatible with php5.3. > > > You are either going to need to upgrade your app to a recent version of > > 1.2.* or find a version of php < 5.3 > > > Mike Karthauser > > Brightstorm limited > > Tel: 07939252144 > > > On 16 Jul 2010, at 08:26, xamako wrote: > > > > Hi! > > > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server > > > PHP 5.3.2, but fails. > > > > These are the errors: > > > > Strict Standards: Redefining already defined constructor for class > > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake > > > \libs\object.php on line 69 > > > > Deprecated: Assigning the return value of new by reference is > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > > \cake\libs\object.php on line 94 > > > > Deprecated: Assigning the return value of new by reference is > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > > \cake\libs\security.php on line 48 > > > > Deprecated: Assigning the return value of new by reference is > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > > \cake\libs\configure.php on line 82 > > > > Strict Standards: Non-static method Configure::getInstance() should > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www > > > \amyadler\new_site\cake\bootstrap.php on line 43 > > > > Strict Standards: Non-static method Configure::write() should not be > > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler > > > \new_site\cake\bootstrap.php on line 82 > > > > Strict Standards: Non-static method Configure::getInstance() should > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www > > > \amyadler\new_site\cake\libs\configure.php on line 102 > > > > Any solution? > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > > with their CakePHP related questions. > > > > 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 > > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 1.1.11.4064 and PHP 5.3.2 fails
Ok I'm try upgrade to 1.2. Thanks! On Jul 16, 9:33 am, mike karthauser wrote: > Cake 1.1.* is not compatible with php5.3. > > You are either going to need to upgrade your app to a recent version of 1.2.* > or find a version of php < 5.3 > > Mike Karthauser > Brightstorm limited > Tel: 07939252144 > > On 16 Jul 2010, at 08:26, xamako wrote: > > > Hi! > > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server > > PHP 5.3.2, but fails. > > > These are the errors: > > > Strict Standards: Redefining already defined constructor for class > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake > > \libs\object.php on line 69 > > > Deprecated: Assigning the return value of new by reference is > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > \cake\libs\object.php on line 94 > > > Deprecated: Assigning the return value of new by reference is > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > \cake\libs\security.php on line 48 > > > Deprecated: Assigning the return value of new by reference is > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site > > \cake\libs\configure.php on line 82 > > > Strict Standards: Non-static method Configure::getInstance() should > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www > > \amyadler\new_site\cake\bootstrap.php on line 43 > > > Strict Standards: Non-static method Configure::write() should not be > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler > > \new_site\cake\bootstrap.php on line 82 > > > Strict Standards: Non-static method Configure::getInstance() should > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www > > \amyadler\new_site\cake\libs\configure.php on line 102 > > > Any solution? > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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 > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 1.1.11.4064 and PHP 5.3.2 fails
Hi! I'm trying to run a project written in cakephp 1.1.11.4064 on a server PHP 5.3.2, but fails. These are the errors: Strict Standards: Redefining already defined constructor for class Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake \libs\object.php on line 69 Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site \cake\libs\object.php on line 94 Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site \cake\libs\security.php on line 48 Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site \cake\libs\configure.php on line 82 Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\Program Files\EasyPHP-5.3.2i\www \amyadler\new_site\cake\bootstrap.php on line 43 Strict Standards: Non-static method Configure::write() should not be called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler \new_site\cake\bootstrap.php on line 82 Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\Program Files\EasyPHP-5.3.2i\www \amyadler\new_site\cake\libs\configure.php on line 102 Any solution? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Mod_rewrite not work
Good night I am testing a website developed with cakephp, and seems to me a 404 error. I have found that the mod_rewrite module is enabled, phpinfo (). .htaccess files are correct, since they are the default files Any ideas? Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: User differentiation
Try this http://github.com/jedt/spark_plug On Jul 6, 3:00 pm, Davor Ilic wrote: > Hi, > > how i can solve the differentiation > between > Adminusers and the normal Users. Is there an other way to say in methods > like admin: admin_user() {} and normal_user() {} > or is there an other way to do this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: serious problem with cakephp about CakePHP Auth Component & Permissions
Try this http://github.com/jedt/spark_plug On Jun 16, 6:45 am, hoss7 wrote: > i want Users, Groups & Permissions for Groups, for my website Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Defining Permissions: Cake's Database ACL
Good afternoon I'm trying to use Cake ACL. When I try to launch the consultation on the console to create the tables. The result is the following: ♀ Welcome to CakePHP v1.3.2 Console --- App : app Path: C:\Program Files\EasyPHP-5.3.2i\www\cakephp\app --- Cake Schema Shell --- Table is not created. Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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