Re: Naming Conventions - habtm multiple underscores join table
Yeah - I thought I remembered reading that somewhere but couldn't find
the page again to confirm. Bookmarked. Thanks.
On Nov 16, 12:27 pm, Will <000w.s.s....@gmail.com> wrote:
> I think Jeremy is incorrect. If you're doing a HABTM, both table
> names should be plural, so in your example it would be
> xxxxs_yyyy_zzzzs (seehttp://book.cakephp.org/2.0/en/getting-started/cakephp-conventions.ht...)
>
> On Nov 16, 5:32 am, Jeremy Burns | Class Outfit
>
>
>
>
>
>
>
> <jeremybu...@classoutfit.com> wrote:
> > You don't need a model, so that's easy. The convention is table_a_table_bs (where table_a and table_b are used alphabetically and the last table is pluralised). So in your example it's be xxxx_yyyy_zzzzs
>
> > Jeremy Burns
> > Class Outfit
>
> > Tel: +44 (0) 208 123 3822
> > Mob: +44 (0) 7973 481949
> > Skype: jeremy_burnshttp://www.classoutfit.com
>
> > On 16 Nov 2011, at 03:42, TonyCharlotteCakePHP wrote:
>
> > > I have a have two tables that need a join table but one of the tables
> > > that I'm trying to join has an underscore. What I'm wondering is what
> > > the models' file name, models' join database table name, and models'
> > > class name should be.
>
> > > For example:
>
> > > Table one = xxxx
> > > table two = yyyy_zzzz
> > > join table = ?
>
> > > Should the join table in the database be named xxxxs_yyyy_zzzzs ?
> > > Should the model file name for the join be XxxxYyyyZzzz ?
> > > Should the model class name be XxxxYyyyZzzz ?
>
> > > Thanks for your help
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php
--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home