Sunday, 16 December 2007

No more HABTMs?

I started using Cake 1.2s Bindable behavior by Mariano the other day.
It works just like it says on the tin, and will really make it easier to have fewer, simpler queries.

At the same time, Ive been looking into HABTMs.

Now, HABTMs are a bit clunky, (see http://groups.google.com/group/cake-php/msg/12598076103b0130) and before the 1.2 'with' addition, occasionally insufficient.
And I'm not blaming Cake, HABTMs aren't an easy thing to simplify, and I doubt its done much better anywhere else.

But now with the expects behaviour, what was previously a work around - i.e creating the two different relations, a hasOne and a reciprocal HasMany - might be the better solution all round.

I'll post more when I get a chance to try it again, with the expects behaviour...

No comments: