Call the join model/table whatever you want and create associations like: Freelancer hasMany CompanyFreelancer Company hasMany CompanyFreelancer CompanyFreelancer belongsTo Freelancer CompanyFreelancer belongsTo Company
HTH, Paul. On Nov 7, 4:29 pm, Justin Edwards <[email protected]> wrote: > I meant a freelancer could work for many companies*. > > On Mon, Nov 7, 2011 at 10:24 AM, Justin Edwards > <[email protected]>wrote: > > > > > > > > > I wanted to add an example. > > > Freelancers as one table > > Companies as another table > > > They would have a many to many relationship because a company could have > > many freelancers working for them, and a freelancer could work for many > > customers. The tricky part is companies/freelancers could have a > > different pay rate, and pay type(percentage of profits, hourly, per > > contract pay, etc) for each relationship, so I wanted to add this data in > > the join table, and wasn't sure if it was okay to leave the table named > > companies_freelancers . > > > I have other HABTM relationships that would stay normal many to many > > joins. > > > Just wanted to bump this and put in more information. > > > On Sun, Nov 6, 2011 at 8:14 PM, Justin Edwards > > <[email protected]>wrote: > > >> Is there a good naming convention for the tablenames for these > >> associations? I have a few tables that I want to convert from HABTM to > >> hasmany through, and haven't used hasmany through yet. Also does bake > >> auto generate hasmany through assocations? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
