I tested your data ,it isn't wrong , has many also contain invoked information between EventSignUp and EventOptionSignUp, please send all your relevant file to me , I will try test to help you and answer for you as soon as, if you have yahoomail please add my one, nhathoangvn2...@yahoo.com.
2009/3/9 Sanfly <san...@gmail.com> > > Hi All > > Ive been trying to get a hasMany association working, but It just wont > seem to work. The pages which use this model simply wont load when I > try to run them > > I have two databases: events_signups, events_options_signups > > Each signup can have many different options, which is why I have the > table events_options_signups to link them. > > The field in events_options_signups table has a field event_signup_id > where I store the id of the events_signups entry it belongs to > > In my EventsOptionsSignup model I have a belongsTo association which > works great: > > var $belongsTo = array( > 'EventsSignup' => > array('className' => 'EventsSignup', > 'foreignKey' => > 'event_signup_id', > ) > > ); > > But I cant get the hasMany association to work when going the other > way, and i need to be able to extract that data when searching by > EventsSignup > > var $hasMany = array( > 'EventsOptionsSignup' => > array('className' => 'EventsOptionsSignup', > 'foreignKey' => > 'event_signup_id', > ), > ); > > Is there anything im doing wrong that is obvious to anyone? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---