Sunday, August 30, 2009

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

nevermind, figured it out. i was putting it in the wrong model. goals
rather than users

On Aug 30, 3:17 pm, centr0 <centrosc...@gmail.com> wrote:
> 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: