On Wed, Dec 8, 2010 at 5:42 AM, Jens Dittrich <[email protected]> wrote:
> Hello,
>
> I have the following situation in which i need help:
> There are people, roles and lectures, summer_schools and
> presentations.
> People HABTM roles. Depending on their role people are associated to
> lectures or summer_schools or presentations. So I am planning on
> creating more HABTM-tables called lectures_people_roles,
> people_roles_summer_schools and so on.
>
> Is that supported by cakes ORM(bake)? Is ist configurable manually in
> the models or am I asking to much or just making it more complicated
> than necessary?
I think the latter. You could probably use:
Person HABTM Role
Role <-> Lecture
Rol <-> SummerSchool
Role <-> Presentation
I left the other assoc. blank as you haven't described it enough.
Perhaps hasOne/belongsTo? The upshot of it, though, is that you could
do a find on Person and get:
Person
- Role
- [Lecture|SummerSchool|Presentation]
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en