Jul 7, 2009

CakePHP Trac Ticket #633 = Headache!

Take a look at this major limitation of CakePHP:
Recursive Association Support

Users belong to Chapters. Chapters belong to Conferences. Given a user's ID, how can I find out which conference he is in?

I can do this quite easily with SQL, but the whole point of using a framework is to abstract away from SQL. I've been trying to figure out how to do this in CakePHP all day, and then I realized that the framework doesn't support this type of recursive association.

Grrrr!!!

There are some hacky hacks out there, but I'm real nervous about copying someone else's hacky code. I think I'll resort to hand-writing SQL queries for this. I wish I would have know about this bug eight hours ago!

No comments:

Post a Comment