Hi there,
I'm trying to make a (kind of) dictionary and I have the following
setup:

Tables:
tag: The word, for example, "free"
tag_content: Each tag has one or many contents or meanings: "as in
beer" and "as in speech". This example might not be the best but those
contents could be linked to other tags.
tags_tag_content: The relationship table, since many tags can have
many contents and viceversa.

I have established the HABTM relationship correctly (Or so I think)

Then, in the Tag model, I have a function that should bring the all
contents for that tag.
How do I do that? is it possible using find or do I need to make a
custom query?

If I do a find on the Content model, I can bring all the contents but
I don't know how to do a contidion for "Tag.id"=>1

I've also tried doing a find on the relationship table but it repeats
the Tag object in every returned row.

Thanks!



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to