Sunday, August 30, 2009

$hasOne/'dependent' => 'true' vs. $belongsTo

this is my app's relationships as far as i have set them up.

users have many goals
goals belongsTo users
users habtm departments
departments habtm users
departments have many categories
categories have many goals

goals belongsTo users, departments, and categories

when i scaffold this setup everything works out perfect with the
select lists populating. but i want it where if someone deletes a
category, the goals under that category will be deleted as well. ive
tried goals hasOne category, but when i go to add the category the
select list is no more, only a text field to type the category
yourself.

is there anyway i can still have that select list populate and have
goals dependent on categories?
--~--~---------~--~----~------------~-------~--~----~
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: