Accessing individual HABTM records in a form

Posted by Pichan on Stack Overflow See other posts from Stack Overflow or by Pichan
Published on 2010-06-15T10:08:24Z Indexed on 2010/06/15 10:12 UTC
Read the original article Hit count: 183

Filed under:
|
|
|

I'm building a form in my CakePHP project that lets you edit a company's information. Among all other things, every company has at least one geographical area in which the company operates, but it may have more. The areas are selected individually using select dropdowns.

The relationship between companies and areas is HABTM, because I need to be able to change the amount of associated areas without modifying the database.

Currently the associations and corresponding data are handled separately, which isn't really a problem but I was wondering how it could be done using as much Cake's own 'automagic' functionality as possible?

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about form