Posts

Showing posts with the label Association

Rich Association Traversal

Image
Greetings My Friend, We could gain the ability to add complexity   of other attributes and methods   inside our section edit's model,   we lost something at the same time.   We now have to go through an extra step   to get from one side of the association over to the other.   For example, in our simple, has and belongs to many join,   if we wanted to know all of the admin users   who could edit a page,   we could just request the array of admin users,   page dot admin users and we'd get back an array. It would reach across the join table   to the other side of the association   but in our rich join,   we can't just ask for section's admin users  because there is no direct relationship   between section and admin user.   There's a model that's in between now.   We can still do it,   we just have to go through that extra step   of going through the section edits   and looking up e...