Thank you for your suggestion :) I will take care of this.
Actually I am using that code for country and state selectbox in Employee registration form Now I have modify that code to var $belongsTo = array('UserCountrie','UserState'); and in State model I have added var $BelongsTo = array('UserCountrie'); var $hasMany = array('UserEmp'); and in Country model I have added var $hasMany = array('UserState','UserEmp'); So that I will use Ajax for state selectbox fill up while selecting country Manisha. On Mar 16, 10:54 am, Martin Westin <martin.westin...@gmail.com> wrote: > Don't use empty strings for conditions. Use empty arrays. This might > possibly cause your problem since it will find all records for you. At > least it used to in the pre-release versions of 1.2. > > Also about recursive: recursive 0 loads belongsTo data. Setting > recursive -1 will load only the primary model. But if you have enough > data to run out of memory you should probably get comfortable with > containable since it offer more control. > > /Martin > > On Mar 16, 5:03 am, Manisha P <pmanisha1...@gmail.com> wrote: > > > I have added > > > var $belongsTo = array('UserState' => > > > array('className' => 'UserState', > > > 'foreignKey'=>false, > > > 'conditions' => '', > > > 'fields' => '', > > > 'order' => '', > > > 'counterCache' => '' > > > ), > > > 'UserCountrie' => > > > array('className' => 'UserCountrie', > > > 'foreignKey'=>false, > > > 'conditions' => '', > > > 'fields' => '', > > > 'order' => '', > > > 'counterCache' => '' > > > ) > > > ); > > this code in my model, Is there anything wrong? > > > On Mar 14, 1:21 pm, brian <bally.z...@gmail.com> wrote: > > > > On Sat, Mar 14, 2009 at 6:58 AM, Manisha P <pmanisha1...@gmail.com> wrote: > > > > > Hello All, > > > > > I have added $belongsTo in model, and getting Fatal error: Allowed > > > > memory size of 25165824 bytes exhausted (tried to allocate 4 bytes) > > > > while running. sad.gif > > > > > Does anyone has some idea about this? > > > > You probably have too many recursive associations. Adjust the > > > 'recursive' param in your find() or investigate your models. Your > > > associations may be incorrect. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---