Thanks for your helpful intuitive insight.
I should have been more clear as to my problem and details.
My final outcome will be like so:
1) Each image is in a specific category.
2) There will be no more than one-level of category (meaning there will be no subcategories).
3) Images will not be in more than one category (so each image will only be assigned to one category).
So I figured for my db setup, I would need a minimal of the below:
gallery_images (table)
-- id
-- title
-- description
-- gallery_category_id
gallery_categories (table)
-- id
-- title
The user interface will list out the category names as links, and when a link is selected, all images matching the gallery_category_id will display.
Does this seem like a logical structure?
And the more I look at this, it seems a hasMany relationship could be totally sufficient.
Am I totally off on this? Do you have any other suggestions?
--
View this message in context: http://n2.nabble.com/association-type-for-model-hasMany-or-HABTM-tp2540870p2541598.html
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
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:
Post a Comment