cake-php@googlegroups.com
[Top] [All Lists]

Re: How to validate HABTM extra fields

Subject: Re: How to validate HABTM extra fields
From: WebbedIT
Date: Sun, 18 Apr 2010 23:47:05 -0700 PDT
The HABTM association is really just a convenience wrapper for when
you want a basic many-to-many join, as soon as you want to do anything
else with the join model/table I would reccomend switching to the more
reliable and predictable:

ModelA hasMany JoinModel
ModelB hasMany JoinModel
JoinModel belongsTo array(ModelA, ModelB)

The join model then acts as any other model and gives you the ability
to save extra fields along with validation.

HTH

Paul

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 cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

<Prev in Thread] Current Thread [Next in Thread>