Some info on how 'with' is used can be found here:
http://www.cakephp.org/files/OCPHP.pdf
Note:
- using 'with' is optional,
- scaffold controller methods and views built with bake wont take care
of extra fields


On Dec 12, 3:43 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote:
> Went looking for the code I had sorted for this but can't find it
> right now.
>
> Cake 1.2 + the "with" model attribute.
> Involves creating a model for the join and telling it's children which
> table to use for the join.
>
> One problem is Cake doesn't allow you to use the combined FKs as PK.
> So you need an auto-number in your bridge table (ewwww).
> So make sure you add another unique index to keep the bridge table
> data clean.
>
> -Ben
>
> On Dec 12, 10:31 am, MonkeyGirl <[EMAIL PROTECTED]> wrote:
>
> > Hi.
>
> > Thanks for your help before, everyone... This one's just a quick
> > question. I'm pretty sure the answer's "just make the new model and
> > stop being lazy", but I'd like to make sure just in case.
>
> > I've got a project with a has-and-belongs-to-many relationship,
> > linking a products table to a features table, so that each product can
> > have several features, and each feature can have several products.
> > I've got a form where you tick all the features you want each product
> > to have, and thanks to CakePHP I don't even have to write any complex
> > code to work out which ticks are new and which have gone, it
> > automatically works all of that out. Brilliant.
>
> > Now the client wants some of these features to be "key features",
> > meaning I'll need to put in an extra boolean type column in the
> > linking table to say if any of the ticked features are extra specially
> > important to that particular product or not. My question is this: do I
> > need to replace this simple HABTM relationship with two regular
> > belongs-to/has-many relationships, and make a proper model for the
> > linking table?
>
> > Sorry to trouble you with a question that I'm pretty sure I already
> > know the answer to, but I'd really be kicking myself if I found out
> > HABTM relationships can handle extra information about the linking
> > table.
>
> > Thank you very much,
> > Zoe.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to