Hi Stephen

Many thanks for the reply.  As you say the name doesn't make much
sense without the Address in it especially as there are other
"LineTypes" etc in the system.  If as you suggest I use
AddressLineType am I right in thinking the table name is
address_line_types and cake'd have a problem with table called
address_linetypes?

Thanks again for your help.

Regards

Paul

On Feb 16, 6:12 pm, Stephen <[email protected]> wrote:
> Hi Paul
>
> On 16 February 2011 14:51, paul_rogers6 <[email protected]> wrote:
>
> > Secondly, if I have a table called address_types and a table called
> > address_line_types is my join table have the name
> > address_line_types_address_types?  It seems a bit long winded!!  Is it
> > acceptable to call my class for the line types AddressLinetypes and
> > the table address_linetypes?  Or will this cause problems for Cake?
>
> This is a little bit long winded, it is good practise to label your tables
> in such a way but it isn't a requirement, its main purpose I like to believe
> is so that if anybody else views your code/db they can understand the
> associations without doing research.
>
> Let's say if I was working with the model "User" and the table "users".
>
> User has One Profile.
>
> I would normally label Profile "Profile" instead of "UserProfile" because my
> app is user orientated and most of my tables would relate to the user.
>
> If it was a table used to hold images I would use "UserImages" or
> "ProfileImages"
>
> This may not be the cake way, but sometimes it can become long winded, and
> this is my way around.
> In your case I would use AddressLineType and AddressType because it doesn't
> make much sense without the "Address" in it, and "Type" could be confused
> with other things.
>
> My 2 cents, but not necessarily correct.
> --
> Kind Regards
>  Stephen @ NinjaCoderMonkey
>
>  www.ninjacodermonkey.co.uk

-- 
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

Reply via email to